/**
 * Mobile Responsive CSS - Front End
 * Optimal untuk tampilan HP seperti aplikasi
 */

/* ===== RESET MOBILE ===== */
@media (max-width: 767.98px) {
  html {
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
  }
  body {
    overflow-x: hidden;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Fix container */
  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    max-width: 100% !important;
  }
  
  /* ===== NAVBAR MOBILE ===== */
  .layout-navbar .navbar {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  .layout-navbar .app-brand-logo img {
    width: 50px !important;
    height: auto !important;
  }
  .layout-navbar .navbar-nav .btn {
    padding: 0.35rem 0.75rem !important;
    font-size: 0.8rem !important;
  }
  .layout-navbar .navbar-nav .btn span {
    display: none !important;
  }
  .layout-navbar .navbar-nav .btn i {
    margin-right: 0 !important;
  }
  
  /* ===== HERO SECTION ===== */
  .landing-hero {
    padding-top: 4rem !important;
  }
  .landing-hero .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  /* Carousel responsive */
  .landing-hero .carousel-item img,
  .hero-slide-img {
    height: 320px !important;
    object-fit: cover;
  }
  
  /* Hero content wrapper - border radius kecil di mobile */
  .hero-content-wrapper {
    border-radius: 0 !important;
  }
  
  /* Hero text box - absolute overlay di atas carousel */
  .hero-text-box.position-absolute {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: none !important;
    margin-top: 0 !important;
    padding: 1rem !important;
    width: 100% !important;
  }
  .hero-text-box h3 {
    font-size: 1.5rem !important;
    margin-bottom: 0.5rem !important;
  }
  .hero-text-box h2 {
    font-size: 0.9rem !important;
    margin-bottom: 1rem !important;
  }
  .hero-text-box .btn {
    font-size: 0.9rem !important;
    padding: 0.6rem 1.5rem !important;
  }
  
  /* Carousel controls - lebih besar untuk mobile */
  .carousel-control-prev,
  .carousel-control-next {
    width: 40px !important;
    height: 40px !important;
    top: 40% !important;
  }
  
  /* ===== PRICING SECTION ===== */
  .landing-pricing .row > div {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .landing-pricing .card {
    margin-bottom: 0.5rem;
  }
  .landing-pricing .card-header {
    padding: 1rem !important;
  }
  .landing-pricing .card-body {
    padding: 1rem !important;
  }
  .landing-pricing h5.display-5 {
    font-size: 2rem !important;
  }
  .landing-pricing .list-unstyled h5 {
    font-size: 0.9rem !important;
    margin-bottom: 0.5rem !important;
  }
  .landing-pricing .list-unstyled img {
    width: 18px !important;
    height: auto !important;
  }
  
  /* ===== FEATURES SECTION ===== */
  .landing-features {
    padding-top: 3rem !important;
  }
  .landing-features .features-icon-box {
    padding: 1rem 0.5rem !important;
  }
  .landing-features .features-icon-box .features-icon {
    width: 3.5rem !important;
    height: 3.5rem !important;
  }
  .landing-features .features-icon-box .features-icon i {
    font-size: 1.8rem !important;
  }
  .landing-features .features-icon-box h5 {
    font-size: 1rem !important;
  }
  .landing-features .features-icon-box p {
    font-size: 0.85rem !important;
  }
  
  /* ===== TEAM SECTION ===== */
  .landing-team .team-image-box {
    height: 9rem !important;
  }
  .landing-team .team-image-box img {
    height: 11rem !important;
  }
  .landing-team .card-body {
    padding: 0.75rem !important;
  }
  .landing-team .card-body h5 {
    font-size: 0.95rem !important;
  }
  .landing-team .card-body p {
    font-size: 0.8rem !important;
  }
  
  /* ===== FUN FACTS ===== */
  .landing-fun-facts .row {
    gap: 0.5rem;
  }
  .landing-fun-facts .col-md-3 {
    padding: 0.5rem !important;
  }
  .landing-fun-facts .fun-facts-icon {
    width: 3.5rem !important;
    height: 3.5rem !important;
    padding: 0.8rem !important;
    margin-bottom: 0.5rem !important;
  }
  .landing-fun-facts .fun-facts-icon i {
    font-size: 1.8rem !important;
  }
  .landing-fun-facts .fun-facts-text {
    font-size: 1.5rem !important;
  }
  .landing-fun-facts h6 {
    font-size: 0.75rem !important;
  }
  
  /* ===== FOOTER ===== */
  .landing-footer .footer-top {
    padding: 2rem 0 !important;
  }
  .landing-footer .footer-title {
    font-size: 0.85rem !important;
    margin-bottom: 0.75rem !important;
  }
  .landing-footer .footer-link {
    font-size: 0.8rem !important;
  }
  .landing-footer .form-floating {
    width: 100% !important;
  }
  .landing-footer .form-floating input {
    font-size: 0.85rem !important;
  }
  .landing-footer .d-flex.gap-4 {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
  .landing-footer .d-flex.gap-4 .btn {
    width: 100% !important;
  }
  .landing-footer .col-lg-2,
  .landing-footer .col-lg-3 {
    margin-bottom: 1rem;
  }
  .landing-footer .footer-bottom {
    padding: 1rem 0 !important;
  }
  .landing-footer .footer-bottom .container {
    flex-direction: column !important;
    text-align: center !important;
    gap: 0.5rem;
  }
  
  /* ===== TYPOGRAPHY ===== */
  h5.text-center.mb-2 .display-5 {
    font-size: 1.25rem !important;
  }
  .text-uppercase {
    font-size: 0.75rem !important;
  }

  /* ===== AUTH PAGES (Login, Register, OTP) ===== */
  .authentication-wrapper {
    min-height: 100vh !important;
  }
  .authentication-inner .w-px-400 {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
  }
  .authentication-inner .auth-cover-brand {
    position: relative !important;
    padding: 1rem !important;
    justify-content: center !important;
    top: auto !important;
    left: auto !important;
  }
  
  /* Form floating lebih touch-friendly */
  .form-floating > .form-control:focus ~ label,
  .form-floating > .form-control:not(:placeholder-shown) ~ label {
    font-size: 0.75rem !important;
  }
  
  /* OTP input */
  .otp-input {
    font-size: 1.25rem !important;
    letter-spacing: 4px !important;
  }

  /* ===== ADMIN / PELANGGAN PORTAL ===== */
  .layout-page .content-wrapper {
    padding-bottom: 70px !important;
  }
  
  /* Card dashboard lebih compact */
  .card-body {
    padding: 1rem !important;
  }
  
  /* Statistics cards rows */
  .row > [class*="col-"] {
    margin-bottom: 0.5rem;
  }
  
  /* Small box (AdminLTE) responsive */
  .small-box {
    border-radius: 0.5rem !important;
    margin-bottom: 0 !important;
  }
  .small-box .inner h3 {
    font-size: 1.5rem !important;
  }
  .small-box .inner p {
    font-size: 0.8rem !important;
  }
  
  /* DataTables responsive toggle */
  table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before {
    left: 5px !important;
  }
  
  /* Modal full screen di mobile */
  .modal-dialog {
    margin: 0.5rem !important;
    max-width: calc(100% - 1rem) !important;
  }
  .modal-content {
    border-radius: 0.75rem !important;
  }
  
  /* Dropdown menu */
  .dropdown-menu {
    max-width: 90vw !important;
  }
  
  /* Tabs */
  .nav-tabs .nav-link {
    font-size: 0.8rem !important;
    padding: 0.5rem 0.65rem !important;
  }
  
  /* Invoice detail page */
  .invoice-print .row {
    flex-direction: column;
  }
  .invoice-print .col-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 991.98px) {
  .landing-hero .carousel-item img {
    height: 400px !important;
    object-fit: cover;
  }
  .hero-text-box h3 {
    font-size: 1.8rem !important;
  }
  .landing-pricing .card-header {
    padding: 1.25rem !important;
  }
}

/* Landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  .landing-hero {
    min-height: auto !important;
  }
  .hero-text-box {
    padding: 0.5rem 1rem !important;
  }
  .hero-text-box h3 {
    font-size: 1.2rem !important;
    margin-bottom: 0.25rem !important;
  }
  .hero-text-box h2 {
    font-size: 0.8rem !important;
    margin-bottom: 0.5rem !important;
  }
  .hero-text-box .btn {
    font-size: 0.8rem !important;
    padding: 0.4rem 1rem !important;
  }
  .landing-hero .carousel-item img {
    height: 180px !important;
  }
}
