/**
 * Mobile Navigation Bar Styles for EduAtal
 * This file contains styles for the mobile-only navigation bar
 * Fully responsive for all mobile screen sizes
 */

/* Base styles - apply to all screen sizes */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Hide mobile navigation on desktop */
.mobile-nav-container {
  display: none;
}

/* Mobile Navigation Styles */
@media (max-width: 992px) {
  /* Show mobile navigation on mobile devices */
  .mobile-nav-container {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    overflow: hidden; /* Prevent content from spilling out */
  }
  
  /* Mobile Nav Header */
  .mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: #1b4670;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1002;
    width: 100%;
  }
  
  /* Mobile Logo */
  .mobile-logo {
    height: 40px;
    display: flex;
    align-items: center;
  }
  
  .mobile-logo-img {
    height: 100%;
    width: auto;
    max-width: 100%; /* Ensure image doesn't overflow */
  }
  
  /* Mobile Nav Toggle Button */
  .mobile-nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1003;
    margin-left: 15px; /* Add space between logo and toggle */
    flex-shrink: 0; /* Prevent button from shrinking */
  }
  
  .mobile-nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
  }
  
  /* Toggle Animation */
  .mobile-nav-toggle.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
  }
  
  .mobile-nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-nav-toggle.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
  }
  
  /* Mobile Nav Menu */
  .mobile-nav-menu {
    position: fixed;
    top: 64px; /* Height of the header */
    left: 0;
    width: 100%;
    height: calc(100vh - 64px);
    background-color: #fff;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1001;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  }
  
  .mobile-nav-menu.active {
    transform: translateX(0);
  }
  
  /* Mobile Nav Content */
  .mobile-nav-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 100%;
  }
  
  /* Mobile Nav Links */
  .mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    width: 100%;
  }
  
  .mobile-nav-item {
    margin-bottom: 5px;
    width: 100%;
  }
  
  .mobile-nav-item a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 100%;
    font-size: 16px;
  }
  
  .mobile-nav-item a:hover,
  .mobile-nav-item a:active {
    background-color: rgba(27, 70, 112, 0.1);
    color: #1b4670;
  }
  
  /* Mobile Dropdown */
  .mobile-dropdown {
    position: relative;
    width: 100%;
  }
  
  .mobile-dropdown-toggle {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100%;
  }
  
  .mobile-dropdown-toggle i {
    transition: transform 0.3s ease;
    margin-left: 10px;
    font-size: 14px;
  }
  
  .mobile-dropdown.active .mobile-dropdown-toggle i {
    transform: rotate(180deg);
  }
  
  .mobile-dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(27, 70, 112, 0.05);
    border-radius: 8px;
    width: 100%;
  }
  
  .mobile-dropdown.active .mobile-dropdown-menu {
    max-height: 300px; /* Increased to accommodate more items */
    margin-top: 5px;
    margin-bottom: 10px;
  }
  
  .mobile-dropdown-menu li {
    width: 100%;
  }
  
  .mobile-dropdown-menu li a {
    padding: 10px 15px 10px 30px;
    font-size: 14px;
    color: #555;
    border-left: 3px solid transparent;
    width: 100%;
    display: block;
  }
  
  .mobile-dropdown-menu li a:hover,
  .mobile-dropdown-menu li a:active {
    background-color: rgba(255, 102, 0, 0.1);
    color: #ff6600;
    border-left-color: #ff6600;
  }
  
  /* Mobile Contact Info */
  .mobile-contact-info {
    margin-top: 10px;
    padding: 15px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    width: 100%;
  }
  
  .mobile-contact-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    margin-bottom: 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    width: 100%;
  }
  
  .mobile-contact-item:hover,
  .mobile-contact-item:active {
    background-color: rgba(27, 70, 112, 0.1);
  }
  
  .mobile-contact-item i {
    margin-right: 15px;
    font-size: 18px;
    color: #ff6600;
    flex-shrink: 0;
  }
  
  .mobile-contact-item span {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* Mobile Register Button */
  .mobile-register-container {
    padding: 15px 0;
    margin-top: 10px;
    width: 100%;
  }
  
  .mobile-register-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 15px;
    background-color: #ff6600;
    color: white;
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 102, 0, 0.2);
    font-size: 16px;
  }
  
  .mobile-register-btn i {
    margin-left: 10px;
    transition: transform 0.3s ease;
  }
  
  .mobile-register-btn:hover,
  .mobile-register-btn:active {
    background-color: #e25700;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 102, 0, 0.3);
  }
  
  .mobile-register-btn:hover i {
    transform: translateX(5px);
  }
  
  /* Mobile Nav Overlay */
  .mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  
  .mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Hide original navigation on mobile */
  .nav-bar, .top-bar {
    display: none;
  }
  
  /* Add padding to body when mobile nav is active */
  body.mobile-nav-active {
    padding-top: 64px;
  }
  
  /* Prevent body scroll when mobile nav is open */
  body.no-scroll {
    overflow: hidden;
  }
}

/* Large Mobile Devices (768px and below) */
@media (max-width: 768px) {
  .mobile-nav-header {
    padding: 10px 15px;
  }
  
  .mobile-logo {
    height: 38px;
  }
  
  .mobile-nav-menu {
    top: 58px; /* Adjusted for smaller header */
    height: calc(100vh - 58px);
  }
  
  .mobile-nav-content {
    padding: 15px;
  }
  
  .mobile-nav-item a {
    padding: 10px 12px;
    font-size: 15px;
  }
  
  .mobile-dropdown-menu li a {
    padding: 8px 12px 8px 25px;
    font-size: 13px;
  }
  
  .mobile-contact-item {
    padding: 8px 12px;
  }
  
  .mobile-register-btn {
    padding: 12px;
    font-size: 15px;
  }
  
  body.mobile-nav-active {
    padding-top: 58px;
  }
}

/* Medium Mobile Devices (576px and below) */
@media (max-width: 576px) {
  .mobile-nav-header {
    padding: 8px 12px;
  }
  
  .mobile-logo {
    height: 35px;
  }
  
  .mobile-nav-toggle {
    width: 28px;
    height: 22px;
  }
  
  .mobile-nav-menu {
    top: 51px; /* Adjusted for smaller header */
    height: calc(100vh - 51px);
  }
  
  .mobile-nav-content {
    padding: 12px;
  }
  
  .mobile-nav-item a {
    padding: 8px 10px;
    font-size: 14px;
  }
  
  .mobile-dropdown-menu li a {
    padding: 7px 10px 7px 20px;
    font-size: 12px;
  }
  
  .mobile-contact-item {
    padding: 7px 10px;
    font-size: 13px;
  }
  
  .mobile-contact-item i {
    font-size: 16px;
    margin-right: 10px;
  }
  
  .mobile-register-btn {
    padding: 10px;
    font-size: 14px;
  }
  
  body.mobile-nav-active {
    padding-top: 51px;
  }
}

/* Small Mobile Devices (480px and below) */
@media (max-width: 480px) {
  .mobile-nav-header {
    padding: 8px 10px;
  }
  
  .mobile-logo {
    height: 32px;
  }
  
  .mobile-nav-toggle {
    width: 26px;
    height: 20px;
    margin-left: 10px;
  }
  
  .mobile-nav-toggle span {
    height: 2px;
  }
  
  .mobile-nav-menu {
    top: 48px; /* Adjusted for smaller header */
    height: calc(100vh - 48px);
  }
  
  .mobile-nav-content {
    padding: 10px;
  }
  
  .mobile-nav-item a {
    padding: 8px;
    font-size: 13px;
  }
  
  .mobile-dropdown-menu li a {
    padding: 6px 8px 6px 18px;
    font-size: 12px;
  }
  
  .mobile-contact-item {
    padding: 6px 8px;
    font-size: 12px;
  }
  
  .mobile-contact-item i {
    font-size: 14px;
    margin-right: 8px;
  }
  
  .mobile-register-btn {
    padding: 8px;
    font-size: 13px;
  }
  
  body.mobile-nav-active {
    padding-top: 48px;
  }
}

/* Extra Small Mobile Devices (360px and below) */
@media (max-width: 360px) {
  .mobile-nav-header {
    padding: 6px 8px;
  }
  
  .mobile-logo {
    height: 30px;
  }
  
  .mobile-nav-toggle {
    width: 24px;
    height: 18px;
    margin-left: 8px;
  }
  
  .mobile-nav-menu {
    top: 42px; /* Adjusted for smaller header */
    height: calc(100vh - 42px);
  }
  
  .mobile-nav-content {
    padding: 8px;
  }
  
  .mobile-nav-item a {
    padding: 7px;
    font-size: 12px;
  }
  
  .mobile-dropdown-menu li a {
    padding: 5px 7px 5px 15px;
    font-size: 11px;
  }
  
  .mobile-contact-item {
    padding: 5px 7px;
    font-size: 11px;
  }
  
  .mobile-contact-item i {
    font-size: 13px;
    margin-right: 7px;
  }
  
  .mobile-register-btn {
    padding: 7px;
    font-size: 12px;
  }
  
  body.mobile-nav-active {
    padding-top: 42px;
  }
}

