/* MEGA MENU FIX FOR DEMO - FULL COACHING LIST & STABLE LAYOUT */

header.top-header {
    position: fixed !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    background: #fff !important;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08) !important;
}

.container.relative-pos {
    position: relative !important;
}

.header-right-stack {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
}

@media (max-width: 991px) {
    .header-right-stack {
        align-items: center !important;
        padding: 20px 0 !important;
    }
}

.navbar {
    padding: 5px 0 !important;
    background: #fff !important;
}

.navbar-brand img {
    max-height: 80px !important;
    width: auto !important;
}

/* TOP BAR MINI */
.top-bar-mini {
    width: 100% !important;
    text-align: right !important;
    border-bottom: 1px solid #f8f9fa !important;
    padding: 5px 0 !important;
    margin-bottom: 5px !important;
}

.top-bar-mini h6 {
    margin: 0 !important;
    font-size: 13px !important;
    color: #0c1f3f !important;
}

/* NAVIGATION MENU */
.navbar-nav .nav-link {
    color: #0c1f3f !important;
    font-weight: 700 !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}

.btn-gradient-border {
    white-space: nowrap !important;
}

/* DROP DOWN ICONS */
.dropdown-toggle::after {
    content: "\f078" !important;
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
    font-size: 9px !important;
    border: none !important;
    margin-left: 6px !important;
    vertical-align: middle !important;
}

/* MEGA MENU CONTENT - CENTERED */
.nav-item.mega-menu {
    position: static !important;
}

.mega-menu .dropdown-menu {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 1200px !important;
    max-width: 95vw !important;
    top: 100% !important;
    border: none !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 70px rgba(0,0,0,0.18) !important;
    padding: 20px !important;
    display: none;
    background: #fff !important;
    z-index: 99999 !important;
}

.nav-item.mega-menu > .dropdown-menu.show {
    display: block !important;
}

.mega-title {
    display: block !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #8899aa !important;
    letter-spacing: 1.5px !important;
    margin-bottom: 15px !important;
    text-transform: uppercase !important;
    text-align: left !important;
}

.mega-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
}

.coaching-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
}

/* Specific width for Study Abroad to match screenshot */
#studyAbroad + .mega-menu-content {
    width: 520px !important;
}

/* Specific width for Coaching to match 2-column layout */
#coaching + .mega-menu-content {
    width: 600px !important;
}

/* Custom rounded styling for country flag icons */
#studyAbroad + .mega-menu-content .mega-item img {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
}

.mega-item {
    display: flex !important;
    align-items: center !important;
    padding: 6px 12px !important;
    border-radius: 10px !important;
    color: #0c1f3f !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    background: #f8f9fa !important;
    font-size: 16px !important;
    transition: all 0.2s ease !important;
}

.mega-item:hover {
    background: #fff !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
    color: #0b57d0 !important;
    transform: translateY(-2px) !important;
}

/* IMAGE FIX */
.mega-item img {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    object-fit: contain !important;
    margin-right: 15px !important;
    display: block !important;
    border-radius: 4px !important;
}

.mega-item::after, .mega-item::before {
    content: none !important;
}

/* SPACING FOR FIXED HEADER */
section.about-sec-app {
    padding-top: 170px !important;
}

/* LOGIN BUTTON */
.btn-main.bg-btn3 {
    background: #ec691f !important;
    color: #fff !important;
    padding: 9px 22px !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(236, 105, 31, 0.3) !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
}

/* PREMIUM DROPDOWN FOR SERVICES & MORE */
.dropdown-menu-premium {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    min-width: 260px !important;
    border: none !important;
    border-radius: 18px !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.12) !important;
    padding: 12px !important;
    margin-top: 0px !important;
}

.premium-item {
    display: flex !important;
    align-items: center !important;
    padding: 12px 16px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    color: #0c1f3f !important;
    transition: all 0.3s ease !important;
    font-size: 16px !important;
    background: transparent !important;
}

.premium-item i {
    margin-right: 15px !important;
    font-size: 18px !important;
    width: 20px !important;
    text-align: center !important;
}

.premium-item:hover {
    background: #f1f5fb !important;
    color: #0b57d0 !important;
    transform: translateX(5px) !important;
}

@media (max-width: 991px) {
    .top-bar-mini { display: none !important; }
    .mega-menu .dropdown-menu {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        transform: none !important;
        box-shadow: none !important;
        padding: 15px !important;
        border-radius: 0 !important;
    }
    .mega-grid, .coaching-grid { 
        grid-template-columns: 1fr !important; 
        gap: 5px !important;
    }
    section.about-sec-app { padding-top: 100px !important; }
    
    .navbar-nav {
        width: 100% !important;
        text-align: center !important;
    }
    
    .nav-item {
        width: 100% !important;
        border-bottom: 1px solid #f1f5fb !important;
    }
    
    .nav-item:last-child { border-bottom: none !important; }
    
    .nav-link {
        padding: 15px !important;
        width: 100% !important;
    }
    
    /* Center the buttons in mobile menu */
    .nav-item .btn-gradient-border, 
    .nav-item .btn-main.bg-btn3 {
        display: inline-block !important;
        margin: 10px auto !important;
        width: 90% !important;
        text-align: center !important;
    }
    
    .navbar-collapse:not(.show) {
        display: none !important;
    }
    
    .navbar-collapse.show {
        display: block !important;
        background: #fff !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        padding: 10px 20px !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
        border-radius: 0 0 20px 20px !important;
    }
}

/* ==========================================
   PREMIUM RESPONSIVE THOUGHT BUBBLE DESIGN 
   ========================================== */

.testimonial-card .t-cloud-wrapper {
  position: relative !important;
  margin-bottom: 70px !important;
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.06)) !important;
  background: transparent !important;
}

.testimonial-card .t-text {
  position: relative !important;
  background: #ffffff !important;
  padding: 35px 30px !important;
  border-radius: 25px !important; 
  border: 1px solid #e1e8f0 !important; 
  z-index: 1 !important;
  text-align: left !important;
}

/* Thought Bubble - Medium Circle on the left (pointing to video) */
.testimonial-card .t-text::before {
  content: '' !important;
  position: absolute !important;
  left: -20px !important;
  top: 60px !important;
  width: 22px !important;
  height: 22px !important;
  background: #ffffff !important;
  border: 1px solid #e1e8f0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  z-index: 2 !important;
  bottom: auto !important;
  right: auto !important;
}

/* Thought Bubble - Small Circle on the left */
.testimonial-card .t-text::after {
  content: '' !important;
  position: absolute !important;
  left: -35px !important;
  top: 80px !important;
  width: 13px !important;
  height: 13px !important;
  background: #ffffff !important;
  border: 1px solid #e1e8f0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  z-index: 2 !important;
  bottom: auto !important;
  right: auto !important;
}

/* Thought Bubble - Tiny Circle on the left */
.testimonial-card .t-text p::before {
  content: '' !important;
  position: absolute !important;
  left: -45px !important;
  top: 95px !important;
  width: 8px !important;
  height: 8px !important;
  background: #ffffff !important;
  border: 1px solid #e1e8f0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  z-index: 2 !important;
  bottom: auto !important;
}

/* Disable default theme absolute positioning on p::after */
.testimonial-card .t-text p::after {
  display: none !important;
}

/* Responsive adjustment for testimonial text size and spacing */
.testimonial-card .t-text p {
  font-size: 15px !important;
  line-height: 1.6 !important;
  margin-bottom: 0 !important;
  color: #2b3b5c !important;
}

.testimonial-card .client-thumbs {
  margin-top: 20px !important;
}

/* Mobile responsive thought bubble direction (points up towards video when stacked) */
@media (max-width: 991px) {
  .testimonial-card .t-text::before {
    left: 60px !important;
    top: -20px !important;
    bottom: auto !important;
  }
  .testimonial-card .t-text::after {
    left: 45px !important;
    top: -35px !important;
    bottom: auto !important;
  }
  .testimonial-card .t-text p::before {
    left: 35px !important;
    top: -45px !important;
    bottom: auto !important;
  }
}

/* Disable hover trigger for all header dropdown menus and mega menus on desktop */
@media (min-width: 992px) {
    .navbar-nav .nav-item:hover .dropdown-menu:not(.show),
    .navbar-nav .nav-item:hover .mega-menu-content:not(.show),
    .navbar-nav .nav-item:hover .dropdown-menu-premium:not(.show),
    .navbar-nav .dropdown:hover .dropdown-menu:not(.show),
    .navbar-nav .nav-item.dropdown:hover .dropdown-menu:not(.show) {
        display: none !important;
    }
    
    .navbar-nav .dropdown-menu.show,
    .navbar-nav .mega-menu-content.show,
    .navbar-nav .dropdown-menu-premium.show {
        display: block !important;
    }
}
