/* =========== MEDIA QUERIES =========== */

@media (min-width: 375px) {
  /* =========== VARIABLE =========== */

  :root {
    --fs-1: 50px;
    --fs-2: 45px;
    --fs-7: 18px;

    --px: 30px;
  }

  .section-subtitle {
    font-size: var(--fs-7);
  }

  /* =========== HOME =========== */

  .home-right .icon-1 {
    top: 250px;
  }

  .home-right .icon-2 {
    display: block;
    top: 370px;
    right: 50px;
  }

  .home-right .icon-3 {
    display: block;
    top: 450px;
    left: 0;
  }

  .home-right .icon-4 {
    width: 60px;
    top: 150px;
    right: 50px;
  }

  /* =========== ABOUT =========== */
  .about-left .icon-1 {
    top: 150px;
  }

  .about-left .icon-2 {
    display: block;
    top: 270px;
    right: 0;
  }
}

@media (min-width: 575px) {

  /* =========== VARIABLE =========== */
  :root {
    --px: 40px;
  }

  /* =========== HOME =========== */
  .home .shap-1 img {
    width: 100px;
  }

  .home .shap-3 img {
    width: 250px;
  }

  /* =========== ABOUT =========== */
  .about-left .icon-1 {
    top: 200px;
  }

  .about-left .icon-2 {
    top: 350px;
  }

  /* =========== EVENT =========== */
  .event .play {
    right: -20px;
  }

  .event-card {
    display: flex;
    align-items: center;
    text-align: left;
  }

  .event-card .content-left {
    width: 100px;
    padding-bottom: 0;
    margin-bottom: 0;
    padding-right: 15px;
    margin-right: 25px;
    box-shadow: 1px 0 0 0 var(--light-gray);
  }

  .event .schedule {
    justify-content: start;
    margin-bottom: 5px;
  }

  .event-card .event-name {
    text-align: left;
  }

  /* =========== CONTACT =========== */

  .contact h2 {
    font-size: 37px;
  }
}

@media (min-width: 767px) {

  /* =========== VARIABLE =========== */

  :root {

    --fs-1: 60px;
    --fs-2: 50px;
    --fs-7: 20px;

    --px: 60px;

  }

  /* =========== CATEGORY, COURSE, INSTRUCTOR, BLOG, FOOTER =========== */

  .category .course-item-group,
  .course-grid,
  .instructor-grid,
  .blog-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }



  /* =========== EVENT =========== */

  .event .play {
    right: -100px;
  }



  /* =========== CONTACT =========== */

  .contact-card {
    padding: 40px 60px;
  }

}

@media (min-width: 850px) {

  /* =========== VARIABLE =========== */
  :root {
    --px: 140px;
  }
}


@media (min-width: 992px) {

  /* =========== VARIABLE =========== */

  :root {

    --fs-5: 16px;

    --px: 30px;
    --py: 120px;

  }



  /* =========== HEADER =========== */

  .navbar {
    padding: 20px var(--px);
  }

  .navbar-nav {
    background: transparent;
    position: static;
    box-shadow: none;
    padding: 0;
    opacity: 1;
    transform: scale(1);
    pointer-events: all;
    display: flex;
    align-items: center;
    gap: 20px;
    width: auto;
    border-radius: 0;
    text-align: left;
  }

  .nav-item:not(:last-child) a {
    border-bottom: none;
  }

  .nav-toggle-btn {
    display: none;
  }

  .navbar .btn {
    display: block;
  }



  /* =========== HOME =========== */

  .home {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .home::before {
    top: -100px;
    left: -300px;
  }

  .home::after {
    top: 0;
  }

  .home-left {
    margin-bottom: 0;
  }

  .home .section-subtitle,
  .main-heading,
  .home .section-text {
    text-align: left;
  }

  .home .section-text {
    margin: 0 0 30px;
  }

  .home-btn-group {
    justify-content: start;
  }



  /* =========== ABOUT =========== */

  .about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 40px;
  }

  .about-left {
    margin-left: -70px;
  }

  .about-left img {
    max-width: unset;
  }

  .about-right {
    padding-top: 0;
  }



  /* =========== COURSE =========== */

  .course {
    position: relative;
  }

  .course .section-subtitle,
  .course .section-title {
    max-width: 600px;
  }

  .course-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 0;
  }

  .course .btn-primary {
    position: absolute;
    top: 130px;
    right: var(--px);
  }



  /* =========== EVENT =========== */

  .event {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 50px;
    align-items: center;
  }

  .event-left {
    margin-bottom: 0;
  }

  .event .play {
    right: -10px;
  }



  /* =========== FEATURE =========== */

  .features {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .features-right {
    height: auto;
  }



  /* =========== TESTIMONIALS =========== */

  .testimonials {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
  }



  /* =========== BLOG =========== */

  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }



  /* =========== CONTACT =========== */

  .contact-card {
    grid-template-columns: 1fr 1fr;
  }

  .contact-card h2 {
    text-align: left;
  }

  .contact .btn-primary {
    justify-self: end;
    align-self: center;
  }



  /* =========== FOOTER =========== */

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 2fr;
  }

}

@media (min-width: 1200px) {

  /* =========== VARIABLE =========== */

  :root {

    --fs-1: 70px;
    --fs-2: 55px;
    --fs-3: 40px;
    --fs-4: 25px;
    --fs-7: 22px;

    --px: 120px;

  }



  /* =========== HOME =========== */

  .home-left {
    padding-bottom: var(--py);
  }

  .home .section-text {
    font-size: 18px;
  }



  /* =========== CATEGORY =========== */

  .category .course-item-group {
    grid-template-columns: repeat(3, 1fr);
  }



  /* =========== EVENT =========== */

  .event {
    grid-template-columns: 1fr 1fr;
  }



  /* =========== INSTRUCTOR =========== */

  .instructor-grid {
    grid-template-columns: repeat(4, 1fr);
  }



  /* =========== CONTACT =========== */

  .contact-card h2 {
    font-size: 45px;
  }

}

/* =========================================
   MOBILE NAVIGATION SIDEBAR & ACCORDION
   ========================================= */

/* GLOBAL: Hide overlay on desktop to prevent it becoming a flex item in navbar */
.nav-overlay {
  display: none !important;
}

@media (max-width: 992px) {

  /* 1. Sidebar Styling */
  .navbar-nav {
    position: fixed;
    top: 0;
    left: auto !important;
    /* Override style.css left:0 */
    right: -320px;
    /* Hidden by default */
    width: 300px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    padding: 80px 20px 40px;
    /* Top padding for close area */
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), visibility 0s 0.4s;
    /* Delay visibility on close */
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    border-radius: 20px 0 0 20px;
    visibility: hidden;
    /* Hide to prevent interaction when closed */
  }

  .navbar-nav.active {
    right: 0;
    /* Slide in */
    visibility: visible;
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), visibility 0s;
    /* No delay on open */
  }

  /* 2. Overlay Styling (Mobile Only) */
  .nav-overlay {
    display: block !important;
    /* Enable on mobile */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
  }

  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* 3. Items Styling - Force Column */
  .navbar-nav .nav-item {
    width: 100%;
    margin: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex !important;
    flex-direction: column !important;
    /* Stack link and dropdown VERTICALLY */
    align-items: flex-start !important;
    /* Align to left */
  }

  .nav-item a {
    display: block;
    width: 100%;
    /* Full width for link */
    padding: 15px 10px;
    font-size: 16px;
    color: #333;
    font-weight: 600;
    justify-content: space-between;
  }

  .nav-item a:hover {
    background: rgba(0, 98, 255, 0.05);
    color: #0062ff;
    border-radius: 8px;
  }

  /* 4. Dropdown / Accordion Styling - UNIFIED CLEAN STYLE */
  .navbar-nav .dropdown-menu {
    position: static !important;
    float: none !important;
    display: none !important;
    width: 100% !important;
    background: #ffffff !important;
    /* Unified White Background */
    box-shadow: none !important;
    /* Remove shadow for flat, clean look */
    border: none;
    padding: 5px 0 5px 0 !important;
    /* Tighter vertical padding */
    margin: 0 !important;
    border-radius: 0;
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    z-index: 1;
  }

  /* Active State */
  .navbar-nav .dropdown-menu.active {
    display: block !important;
    animation: slideDown 0.3s ease-out;
  }

  /* Level 2 Items (Inside first dropdown) */
  .dropdown-menu>li>a {
    padding-left: 30px !important;
    /* Clear indentation */
    font-size: 15px;
    color: #444;
    /* Slightly softer black */
    background: transparent !important;
  }

  /* Level 3 items (Nested) */
  .navbar-nav .dropdown-menu .dropdown-menu {
    background: #ffffff !important;
    /* Keep White */
    padding-left: 0 !important;
    /* Reset padding, apply to links instead */
  }

  .navbar-nav .dropdown-menu .dropdown-menu>li>a {
    padding-left: 50px !important;
    /* Deep indentation */
    font-size: 14px;
    color: #666;
    /* Even softer for hierarchy */
    border-left: 3px solid transparent;
    /* Align marker */
  }

  /* Hover/Active for Submoduls */
  .dropdown-menu a:active,
  .dropdown-menu a:focus,
  .dropdown-menu a:hover {
    color: #0062ff !important;
    background: rgba(0, 98, 255, 0.03) !important;
  }

  /* Ensure List Items Stack Vertically */
  .dropdown-menu li {
    border-bottom: none;
    width: 100%;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .dropdown-menu a {
    width: 100%;
    padding: 12px 20px;
    font-weight: 500;
    display: block;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    /* Very subtle separator */
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-5px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Arrow Rotation */
  .dropdown-toggle .arrow {
    transition: transform 0.3s ease;
  }

  .dropdown-toggle.active .arrow {
    transform: rotate(180deg);
  }

  /* 5. Professional Hamburger Icon (Already existing structure, enhancing animation) */
  .nav-toggle-btn {
    z-index: 10000;
    /* Ensure above overlay */
    position: relative;
  }

  /* 6. Fix Navbar Blur Overlay Issue */
  .navbar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #ffffff !important;
    /* Solid white */
  }

  /* 7. 'Unique & Great' Premium Hamburger (Inverted Morph) */
  .nav-toggle-btn {
    z-index: 10001;
    background: #ffffff !important;
    /* Clean White Base */
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 5px;
    /* Tighter gap for modern look */
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy Scale */
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    /* Soft shadow */
    -webkit-tap-highlight-color: transparent;
  }

  /* Hover Effect */
  .nav-toggle-btn:hover {
    box-shadow: 0 8px 20px rgba(0, 98, 255, 0.2);
    transform: translateY(-2px);
  }

  /* Lines */
  .nav-toggle-btn span {
    background-color: #0062ff !important;
    /* Brand Blue Lines */
    height: 2.5px !important;
    width: 26px !important;
    border-radius: 4px;
    transition: all 0.4s ease;
    transform-origin: center;
  }

  /* ACTIVE STATE: The 'Great' Transformation */
  .nav-toggle-btn.active {
    background: #0062ff !important;
    /* Invert to Brand Blue */
    box-shadow: 0 5px 20px rgba(0, 98, 255, 0.4);
    /* Glowing Blue Shadow */
    gap: 0;
    /* Collapse gap for X */
  }

  .nav-toggle-btn.active span {
    background-color: #ffffff !important;
    /* Lines turn White */
  }

  .nav-toggle-btn.active .one {
    transform: translateY(0) rotate(45deg);
    /* Perfect Center Rotations */
    position: absolute;
  }

  .nav-toggle-btn.active .two {
    opacity: 0;
    transform: scale(0);
  }

  .nav-toggle-btn.active .three {
    transform: translateY(0) rotate(-45deg);
    /* Perfect Center Rotations */
    position: absolute;
  }
}