/* ==========================================
   ✨ PREMIUM HEADER & DROPDOWN DESIGN SYSTEM
========================================== */

/* Navbar Base Container */
.navbar-custom {
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  padding: 10px 0 !important;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  transition: all 0.3s ease !important;
  z-index: 1080 !important;
}

/* Brand Logo */
.navbar-brand img {
  height: 52px !important;
  width: auto !important;
  transition: transform 0.3s ease !important;
}

.navbar-brand:hover img {
  transform: scale(1.03);
}

/* Nav Links */
.navbar-custom .nav-link {
  color: #2c3e50 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  margin: 0 6px !important;
  padding: 9px 20px !important;
  border-radius: 25px !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
  background: linear-gradient(135deg, #ffee00 0%, #ffd700 100%) !important;
  color: #1e293b !important;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.45) !important;
  transform: translateY(-1px) !important;
}

/* Caret Icon Styling */
.navbar-custom .dropdown-toggle::after {
  margin-left: 8px !important;
  vertical-align: middle !important;
  transition: transform 0.25s ease !important;
}

.navbar-custom .dropdown.show .dropdown-toggle::after {
  transform: rotate(180deg) !important;
}

/* Dropdown Menu Glassmorphism Card (Glitch-Free System) */
.navbar-custom .dropdown-menu {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 16px !important;
  padding: 8px !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12), 0 5px 15px rgba(0, 0, 0, 0.05) !important;
  min-width: 230px !important;
  margin-top: 6px !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  display: block;
  pointer-events: none;
  z-index: 1090 !important;
}

/* Invisible Hover Bridge to Prevent Flicker between Nav Link & Dropdown */
.navbar-custom .dropdown-menu::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 16px;
  background: transparent;
}

/* Show dropdown on hover (Desktop) AND when Bootstrap JS adds .show */
@media (min-width: 992px) {
  .navbar-custom .dropdown:hover > .dropdown-menu,
  .navbar-custom .dropdown-menu.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
  }
  
  .navbar-custom .dropdown:hover > .dropdown-toggle::after,
  .navbar-custom .dropdown.show > .dropdown-toggle::after {
    transform: rotate(180deg) !important;
  }
}

/* Dropdown Items */
.navbar-custom .dropdown-item {
  color: #334155 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 10px 16px !important;
  border-radius: 10px !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  margin-bottom: 2px !important;
}

.navbar-custom .dropdown-item i {
  font-size: 14px !important;
  width: 22px !important;
  text-align: center !important;
  transition: transform 0.2s ease !important;
}

/* Hover state: Soft pure yellow tint */
.navbar-custom .dropdown-item:hover {
  background: #fffde7 !important;
  color: #8c6d00 !important;
  transform: translateX(4px) !important;
}

.navbar-custom .dropdown-item:hover i {
  transform: scale(1.15);
  color: #d4a000 !important;
}

/* Active state: Pure JSA Gold Highlight */
.navbar-custom .dropdown-item.active,
.navbar-custom .dropdown-item:active {
  background: linear-gradient(135deg, #fff59d 0%, #ffd700 100%) !important;
  color: #1e293b !important;
  font-weight: 700 !important;
  border-left: 4px solid #ffd700 !important;
}

.navbar-custom .dropdown-item.active i,
.navbar-custom .dropdown-item:active i {
  color: #1e293b !important;
}

/* ==========================================
   📱 MOBILE RESPONSIVE ENHANCEMENTS (GLOBAL)
========================================== */

/* 1. Prevent Horizontal Overflow without breaking sticky */
html, body {
  overflow-x: clip;
  width: 100%;
}

/* Sticky Navbar Floating Header */
.navbar-custom {
  position: sticky !important;
  position: -webkit-sticky !important;
  top: 0 !important;
  z-index: 1080 !important;
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

.navbar-custom .dropdown-menu {
  z-index: 1090 !important;
}


/* 2. Responsive Images & Media */
img, iframe, video {
  max-width: 100%;
  height: auto;
}

/* 3. Mobile Navigation Styling */
@media (max-width: 991.98px) {
  .navbar-brand img {
    height: 44px !important;
  }

  .navbar-toggler {
    border: 2px solid rgba(44, 62, 80, 0.15) !important;
    padding: 6px 10px !important;
    border-radius: 10px !important;
  }

  .navbar-collapse {
    background: #ffffff !important;
    padding: 16px 20px !important;
    border-radius: 18px !important;
    margin-top: 12px !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
  }

  .navbar-custom .nav-link {
    margin: 4px 0 !important;
    padding: 10px 18px !important;
    border-radius: 12px !important;
    justify-content: space-between !important;
  }

  .navbar-custom .dropdown-menu {
    display: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
    transition: none !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    margin: 6px 0 10px 0 !important;
    padding: 6px 10px !important;
    border-radius: 14px !important;
  }

  .navbar-custom .dropdown-menu.show {
    display: block !important;
  }

  .navbar-custom .dropdown-item {
    padding: 9px 14px !important;
    font-size: 13.5px !important;
  }
}

/* 4. Hero Section & Carousel Banners on Mobile */
@media (max-width: 768px) {
  #home .carousel-item img,
  .hero-section img {
    max-height: 260px !important;
    object-fit: cover;
  }
  
  .hero-text h1 {
    font-size: 1.8rem !important;
  }
  
  .hero-text p {
    font-size: 0.95rem !important;
  }
}

@media (max-width: 480px) {
  #home .carousel-item img,
  .hero-section img {
    max-height: 200px !important;
  }
}

/* 5. Typography Responsiveness */
@media (max-width: 768px) {
  h1, .display-4 {
    font-size: 1.8rem !important;
    line-height: 1.3 !important;
  }

  h2, .display-5 {
    font-size: 1.4rem !important;
    line-height: 1.3 !important;
  }

  h3 {
    font-size: 1.25rem !important;
  }

  .lead {
    font-size: 0.95rem !important;
  }
  
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
}

@media (max-width: 480px) {
  h1, .display-4 {
    font-size: 1.5rem !important;
  }

  h2 {
    font-size: 1.25rem !important;
  }
}

/* 6. Features Bar on Mobile */
@media (max-width: 768px) {
  .features-bar {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 16px !important;
    border-radius: 16px !important;
  }

  .feature-item {
    padding: 8px !important;
    text-align: center !important;
  }

  .feature-item i {
    font-size: 30px !important;
  }

  .feature-item h5 {
    font-size: 13px !important;
    margin-top: 6px !important;
  }

  .feature-divider {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .features-bar {
    gap: 8px !important;
    padding: 10px !important;
  }

  .feature-item i {
    font-size: 24px !important;
  }

  .feature-item h5 {
    font-size: 12px !important;
  }
}

/* 7. Cards, Brosur & Form Mobile Optimizations */
@media (max-width: 768px) {
  .brosur-card, .panduan-image-box, .office-info {
    margin-bottom: 20px;
  }

  .brosur-caption h5 {
    font-size: 15px;
  }

  .brosur-caption p {
    font-size: 12px;
  }

  .form-control, .form-select {
    font-size: 16px !important; /* iOS safari zoom fix */
    padding: 10px 12px;
  }

  .btn {
    padding: 10px 20px;
  }
  
  .map-container iframe {
    height: 300px !important;
  }
}

/* 8. Testimonials Mobile Grid */
@media (max-width: 576px) {
  .testimonial-grid {
    padding: 0 5px;
  }
  
  .testimonial-grid-img {
    max-width: 100%;
    border-radius: 12px;
  }
}

/* 9. Footer Premium Responsive System */
@media (max-width: 991.98px) {
  .footer {
    padding: 40px 0 0 !important;
  }

  .footer-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 28px !important;
    padding: 0 24px !important;
    max-width: 100% !important;
  }

  .footer-section {
    width: 100% !important;
    flex: none !important;
    grid-column: auto !important;
  }

  .footer-section h3 {
    font-size: 1.05rem !important;
    margin-bottom: 14px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid rgba(255, 215, 0, 0.25) !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .footer-section h3::after {
    display: none !important;
  }

  .contact-item {
    margin-bottom: 12px !important;
  }

  .contact-item .contact-value {
    font-size: 0.9rem !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    line-height: 1.5 !important;
  }

  .footer-links {
    padding-left: 0 !important;
    margin-bottom: 0 !important;
    list-style: none !important;
  }

  .footer-links li {
    margin-bottom: 8px !important;
  }

  .footer-links a {
    font-size: 0.9rem !important;
    display: inline-block !important;
    word-break: normal !important;
  }

  .operational-time {
    background: rgba(255, 255, 255, 0.04) !important;
    padding: 14px 18px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255, 215, 0, 0.15) !important;
  }

  .social-links {
    display: flex !important;
    gap: 12px !important;
    margin-top: 16px !important;
  }

  .social-links a {
    width: 40px !important;
    height: 40px !important;
    font-size: 15px !important;
  }

  .footer-bottom {
    margin-top: 32px !important;
    padding: 20px 16px !important;
    text-align: center !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .footer-bottom p {
    font-size: 0.82rem !important;
    margin-bottom: 0 !important;
  }
}

/* ==========================================
   📱 HOME PAGE SECTIONS RESPONSIVE RULES
========================================== */

@media (max-width: 768px) {
  /* Package Cards Mobile */
  .package-card {
    padding: 28px 20px !important;
    border-radius: 20px !important;
  }
  
  .package-speed {
    font-size: 1.8rem !important;
  }
  
  .package-price {
    font-size: 1.5rem !important;
  }
  
  .package-badge {
    right: 15px !important;
    font-size: 11px !important;
    padding: 4px 12px !important;
  }

  /* Reason Cards Mobile */
  .reason-card {
    padding: 22px 18px !important;
    border-radius: 18px !important;
  }

  .reason-icon {
    width: 50px !important;
    height: 50px !important;
    font-size: 22px !important;
    margin-bottom: 15px !important;
  }

  /* CTA Banner Mobile */
  .cta-banner {
    padding: 32px 20px !important;
    border-radius: 22px !important;
  }

  .cta-banner h2 {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }

  /* Review Cards Mobile */
  .review-card {
    padding: 20px 18px !important;
  }
}

@media (max-width: 576px) {
  .package-card {
    padding: 24px 16px !important;
  }

  .package-features li {
    font-size: 13px !important;
  }

  .cta-banner .btn {
    width: 100% !important;
  }

  /* Kontak Cards 3-Column Mobile System */
  .kontak-card-title {
    font-size: 0.82rem !important;
    margin-bottom: 4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .kontak-icon-img {
    width: 32px !important;
    height: 32px !important;
  }

  .kontak-card-btn {
    font-size: 0.68rem !important;
    padding: 5px 4px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

@media (max-width: 768px) {
  .group-banner-title {
    font-size: 1.05rem !important;
    padding: 10px 16px !important;
    border-radius: 12px !important;
  }
  
  .promo-highlight-badge {
    font-size: 0.95rem !important;
    padding: 12px 18px !important;
    border-radius: 25px !important;
  }

  .jsa-card-header {
    padding: 14px 16px !important;
  }

  .jsa-card-title {
    font-size: 1rem !important;
  }

  .jsa-card-speed {
    font-size: 1.2rem !important;
  }
}

/* ==========================================
   📱 NEW COMPONENTS RESPONSIVE ENHANCEMENTS
========================================== */

/* Mobile/Tablet View: Image stays on RIGHT side, positioned BEHIND text */
@media (max-width: 991.98px) {
  .iso-header-row {
    position: relative !important;
    overflow: hidden;
    padding-bottom: 1rem;
  }

  .iso-text-col {
    position: relative !important;
    z-index: 2 !important;
  }

  .iso-header-img-col {
    position: absolute !important;
    right: -10px !important;
    top: 15px !important;
    transform: none !important;
    width: 65% !important;
    max-width: 360px !important;
    z-index: 1 !important;
    pointer-events: none !important;
    opacity: 0.35 !important;
  }

  .iso-header-img {
    max-height: 280px !important;
    transform: scale(1) !important;
    mix-blend-mode: multiply !important;
  }

  .display-6 {
    font-size: 1.7rem !important;
  }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
  .testi-card-box {
    max-width: 100% !important;
    border-radius: 20px !important;
  }

  .testi-ctrl-btn {
    width: 42px !important;
    height: 42px !important;
  }

  .testi-control-bar {
    gap: 12px !important;
    margin-top: 1.5rem !important;
  }

  .comment-quote-card {
    padding: 16px 18px !important;
    border-radius: 18px !important;
  }

  .comment-quote-text {
    font-size: 0.85rem !important;
  }
}

/* Extra Small Phones (max-width: 576px) */
@media (max-width: 576px) {
  .iso-header-img-col {
    width: 75% !important;
    max-width: 300px !important;
    right: -15px !important;
    opacity: 0.32 !important;
  }

  .iso-header-img {
    max-height: 220px !important;
  }

  .display-6 {
    font-size: 1.5rem !important;
    line-height: 1.35 !important;
  }

  .keung-card-premium {
    padding: 16px 12px !important;
    border-radius: 16px !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
  }

  .keung-icon-box {
    margin-bottom: 8px !important;
  }

  .keung-icon-box iconify-icon {
    width: 28px !important;
    height: 28px !important;
  }

  .keung-card-title {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    margin-bottom: 4px !important;
    line-height: 1.3 !important;
  }

  .keung-card-sub {
    font-size: 0.74rem !important;
    line-height: 1.35 !important;
  }
}


