/* Desktop styles (above 768px) */
@media screen and (min-width: 768px) {
    .mobile-menu,
    .mobile-menu-btn,
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* Mobile-specific styles */
@media screen and (max-width: 767px) {
    /* Fix overflow issues */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
    }

    /* Header adjustments */
    .header-one-wrapper {
        padding: 15px !important;
    }

    /* Hide desktop navigation on mobile */
    .main-nav-one {
        display: none !important;
    }

    .header-right-area-one {
        display: flex !important;
        align-items: center !important;
    }

    /* Hamburger Menu Button */
    .mobile-menu-btn {
        display: block !important;
        width: 30px;
        height: 30px;
        position: relative;
        background: transparent;
        border: none;
        padding: 0;
        margin-left: 15px;
        z-index: 1000;
        cursor: pointer;
    }

    .hamburger-icon,
    .hamburger-icon:before,
    .hamburger-icon:after {
        display: block;
        width: 24px;
        height: 2px;
        background-color: #315A6D;
        position: absolute;
        left: 0px;
        transition: all 0.3s;
    }

    .hamburger-icon {
        top: 14px;
    }

    .hamburger-icon:before {
        content: '';
        top: -8px;
    }

    .hamburger-icon:after {
        content: '';
        bottom: -8px;
    }

    /* Mobile Menu */
    .mobile-menu {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 300px;
        height: 100vh;
        background-color: #fff;
        z-index: 9999;
        padding: 60px 0 20px;
        transition: right 0.3s ease-in-out;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }

    .mobile-menu.active {
        right: 0;
    }

    /* Mobile Menu Close Button */
    .mobile-menu-close {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 30px;
        height: 30px;
        background: transparent;
        border: none;
        cursor: pointer;
    }

    .mobile-menu-close span:before,
    .mobile-menu-close span:after {
        content: '';
        position: absolute;
        width: 20px;
        height: 2px;
        background-color: #333;
        top: 50%;
        left: 50%;
    }

    .mobile-menu-close span:before {
        transform: translate(-50%, -50%) rotate(45deg);
    }

    .mobile-menu-close span:after {
        transform: translate(-50%, -50%) rotate(-45deg);
    }

    /* Mobile Menu List */
    .mobile-nav-list {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .mobile-nav-list li {
        border-bottom: none;
        width: 100%;
    }

    /* Nav Item Wrapper */
    .nav-item-wrapper {
        position: relative;
        padding: 0 20px;
    }

    .nav-item-wrapper .nav-link {
        display: flex;
        align-items: center;
        padding: 12px 0;
        color: #333;
        text-decoration: none;
        font-size: 16px;
        font-weight: 500;
        transition: all 0.3s ease;
        position: relative;
    }

    /* Dropdown Icon */
    .dropdown-icon {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        color: #666;
        transition: all 0.3s ease;
    }

    .has-submenu.active .dropdown-icon {
        color: var(--color-primary, #553CDF);
    }

    /* Submenu */
    .submenu {
        display: none;
        list-style: none;
        padding: 0;
        margin: 0;
        background-color: #f8f9fa;
    }

    .submenu.active {
        display: block;
    }

    .submenu li {
        border-bottom: none;
    }

    .submenu a {
        display: block;
        padding: 12px 20px 12px 35px;
        color: #666;
        text-decoration: none;
        font-size: 14px;
        transition: all 0.3s ease;
        position: relative;
    }

    .submenu a:before {
        content: '';
        position: absolute;
        left: 22px;
        top: 50%;
        width: 4px;
        height: 4px;
        background: #ccc;
        border-radius: 50%;
        transform: translateY(-50%);
    }

    /* Active States */
    .has-submenu.active > .nav-item-wrapper {
        background-color: #f8f9fa;
    }

    .has-submenu.active > .nav-item-wrapper .nav-link {
        color: var(--color-primary, #553CDF);
    }

    /* Mobile Menu Overlay */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Mobile Magazines Button */
    .mobile-magazines-btn {
        display: block;
        margin: 5px 20px;
        padding: 12px 20px;
        background-color: var(--color-primary, #553CDF);
        color: #fff !important;
        text-align: center;
        border-radius: 8px;
        text-decoration: none;
        font-weight: 500;
        transition: background-color 0.3s ease;
    }

    /* Hover/Active States */
    .nav-item-wrapper:hover,
    .nav-item-wrapper:active {
        background-color: #f8f9fa;
    }

    .nav-item-wrapper .nav-link:hover,
    .nav-item-wrapper .nav-link:active {
        color: var(--color-primary, #553CDF);
    }

    .submenu a:hover,
    .submenu a:active {
        background-color: #f1f3f5;
        color: var(--color-primary, #553CDF);
    }

    .mobile-magazines-btn:hover,
    .mobile-magazines-btn:active {
        background-color: #4430b3;
    }

    /* Preserve desktop layout elements */
    .header-one-wrapper {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .left-side-header {
        flex: 0 0 auto;
    }

    .header-right-area-one {
        flex: 0 0 auto;
        margin-left: auto;
    }

    /* Hide desktop elements on mobile */
    .buttons-area:not(.mobile-nav-list .buttons-area) {
        display: none !important;
    }

    /* Awards Grid Mobile Styles */
    .awards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }

    .award-item {
        grid-column: auto !important; /* Reset any span settings */
    }

    .award-image img {
        max-height: 80px !important; /* Slightly smaller images on mobile */
    }

    .award-description {
        font-size: 14px;
        margin-top: 0.5rem;
    }
}

/* Small mobile devices */
@media only screen and (max-width: 479px) {
    h1, .h1 {
        font-size: 28px !important;
        line-height: 1.2 !important;
    }

    h2, .h2 {
        font-size: 24px !important;
        line-height: 1.2 !important;
    }

    h3, .h3 {
        font-size: 20px !important;
        line-height: 1.2 !important;
    }

    /* Adjust padding and margins */
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .single-blog-style-one {
        padding: 10px !important;
    }

    /* Stack elements vertically */
    .header-one-wrapper .left-side-header {
        gap: 20px !important;
    }

    .blog-wrapper-style-2 .wrapper-inner {
        flex-direction: column !important;
    }

    .blog-wrapper-style-2 .wrapper-inner .content {
        padding: 15px !important;
    }
}

/* Fix for iOS Safari bouncing effect */
@supports (-webkit-overflow-scrolling: touch) {
    .mobile-menu {
        -webkit-overflow-scrolling: touch;
    }
}

/* Improve touch interactions */
* {
    -webkit-tap-highlight-color: transparent;
} 

/* Mobile Breadcrumb Styles */
@media (max-width: 767px) {
  .rts-breadcrumb-area {
    background: url(../images/srpkpv/srpk-pic1.jpg);
    background-position: center 22%;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 1;
    position: relative;
    padding-top: 120px !important; /* Increased top padding to prevent navbar overlap */
    padding-bottom: 40px !important;
  }

  .breadcrumb-main-wrapper {
      text-align: center;
  }

  .breadcrumb-main-wrapper .pagination-wrapper {
      margin-bottom: 15px;
      font-size: 14px;
  }

  .breadcrumb-main-wrapper .title {
      font-size: 24px;
      line-height: 1.3;
  }

  .breadcrumb-main-wrapper .pagination-wrapper i {
      margin: 0 8px;
      font-size: 12px;
  }
}