/* Responsive Fixes for PUSPEN Landing Page */

/* Fix untuk orbit-box-wrapper yang tidak responsif */
.orbit-box-wrapper {
  position: relative;
  width: 100%;
  max-width: 350px;
  height: 130px;
  margin: 0 auto;
}

.main-square {
  width: 100%;
  height: 130px;
  background-color: #029d9d;
  color: white;
  border-radius: 16px;
  z-index: 2;
  position: absolute;
  top: 0;
  left: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s ease;
}

.orbit-square {
  position: absolute;
  width: 100%;
  height: 130px;
  border: 2px;
  border-radius: 16px;
  z-index: 0;
  pointer-events: none;
  top: 0;
  left: 0;
  animation: none;
}

/* Media Queries untuk berbagai ukuran layar */

/* Mobile Devices (320px - 480px) */
@media only screen and (max-width: 480px) {
  .orbit-box-wrapper {
    max-width: 280px;
    height: 120px;
    margin: 10px auto;
  }
  
  .main-square {
    height: 120px;
    padding: 15px;
    font-size: 0.9rem;
  }
  
  .orbit-square {
    height: 120px;
  }
  
  .main-square h5 {
    font-size: 1rem;
    margin-bottom: 5px;
  }
  
  .main-square p {
    font-size: 0.8rem;
    line-height: 1.3;
  }
  
  .main-square i {
    font-size: 1.5rem !important;
    margin-bottom: 8px;
  }
  
  /* Fix untuk hero section di mobile */
  .hero-title {
    font-size: 1.8rem !important;
    line-height: 1.3;
  }
  
  .hero-subtitle {
    font-size: 1rem !important;
  }
  
  /* Fix untuk floating cards */
  .floating-card {
    position: static !important;
    display: inline-block;
    margin: 10px;
    padding: 1rem;
    width: auto;
    animation: none !important;
  }
  
  .hero-image {
    text-align: center;
    height: auto !important;
  }
  
  /* Fix untuk navbar */
  .navbar-nav {
    text-align: center;
  }
  
  .nav-link {
    padding: 0.5rem 1rem;
    margin: 0;
  }
  
  /* Fix untuk layanan section */
  #mengapa-puspen .row {
    justify-content: center !important;
  }
  
  #mengapa-puspen .col-md-4 {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }
}

/* Small Mobile Devices (max-width: 375px) */
@media only screen and (max-width: 375px) {
  .orbit-box-wrapper {
    max-width: 250px;
    height: 110px;
  }
  
  .main-square {
    height: 110px;
    padding: 12px;
  }
  
  .orbit-square {
    height: 110px;
  }
  
  .main-square h5 {
    font-size: 0.9rem;
  }
  
  .main-square p {
    font-size: 0.75rem;
  }
  
  .main-square i {
    font-size: 1.3rem !important;
  }
}

/* Tablet Devices (481px - 768px) */
@media only screen and (min-width: 481px) and (max-width: 768px) {
  .orbit-box-wrapper {
    max-width: 320px;
    height: 125px;
  }
  
  .main-square {
    height: 125px;
    padding: 18px;
  }
  
  .orbit-square {
    height: 125px;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
}

/* Large Tablet / Small Desktop (769px - 1024px) */
@media only screen and (min-width: 769px) and (max-width: 1024px) {
  .orbit-box-wrapper {
    max-width: 340px;
  }
}

/* Fix untuk aon-why-choose2-line yang tidak responsif */
@media only screen and (max-width: 768px) {
  .aon-why-choose2-line {
    margin: 20px;
  }
  
  .aon-why-choose2-line::after {
    height: calc(100% + 40px);
    margin: -20px -20px -20px 0px;
  }
  
  .aon-why-choose2-pic {
    height: 300px;
  }
}

@media only screen and (max-width: 480px) {
  .aon-why-choose2-line {
    margin: 15px;
  }
  
  .aon-why-choose2-line::after {
    height: calc(100% + 30px);
    margin: -15px -15px -15px 0px;
  }
  
  .aon-why-choose2-pic {
    height: 250px;
  }
}

/* Fix untuk orbit-foto-wrapper */
@media only screen and (max-width: 768px) {
  .orbit-foto-wrapper {
    width: 95%;
    height: 400px;
  }
}

@media only screen and (max-width: 480px) {
  .orbit-foto-wrapper {
    width: 100%;
    height: 300px;
  }
}

/* Fix untuk event-foto-line */
@media only screen and (max-width: 768px) {
  .event-foto-line {
    margin: 30px 0;
  }
  
  .event-foto-line::after {
    height: calc(100% + 60px);
    margin: -30px -30px -30px 0px;
  }
}

@media only screen and (max-width: 480px) {
  .event-foto-line {
    margin: 20px 0;
  }
  
  .event-foto-line::after {
    height: calc(100% + 40px);
    margin: -20px -20px -20px 0px;
  }
}

/* Fix untuk top-bar yang terlalu padat di mobile */
@media only screen and (max-width: 768px) {
  .top-bar .col-md-6 {
    text-align: center !important;
    margin-bottom: 5px;
  }
  
  .social-links-top span {
    display: block;
    margin-bottom: 5px;
  }
  
  .social-links-top a {
    margin: 0 5px;
  }
  
  .contact-info-top a {
    display: block;
    margin-bottom: 5px;
  }
}

/* Fix untuk container yang overflow */
@media only screen and (max-width: 768px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  body {
    overflow-x: hidden;
  }
  
  * {
    max-width: 100%;
  }
}

/* Fix untuk animasi yang mengganggu di mobile */
@media only screen and (max-width: 768px) {
  .orbit-box-wrapper:hover .orbit-orange,
  .orbit-box-wrapper:hover .orbit-blue {
    animation: none;
  }
  
  /* Disable complex animations on mobile for better performance */
  .aon-why-choose2-line::after,
  .aon-why-choose2-pic::before,
  .orbit-foto-wrapper::before,
  .event-foto-line::after {
    animation: none !important;
  }
}

/* Fix untuk text yang terlalu kecil di mobile */
@media only screen and (max-width: 480px) {
  body {
    font-size: 14px;
  }
  
  p {
    font-size: 14px;
    line-height: 1.5;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.3rem;
  }
  
  h4 {
    font-size: 1.1rem;
  }
  
  h5 {
    font-size: 1rem;
  }
}

/* Fix untuk button yang terlalu kecil di mobile */
@media only screen and (max-width: 480px) {
  .btn {
    padding: 12px 20px;
    font-size: 14px;
    min-height: 44px; /* Touch target minimum */
  }
  
  .btn-cta {
    padding: 12px 20px;
    font-size: 14px;
  }
}

/* Fix untuk spacing yang tidak konsisten */
@media only screen and (max-width: 768px) {
  .py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  .mb-5 {
    margin-bottom: 2rem !important;
  }
  
  .mt-4 {
    margin-top: 1.5rem !important;
  }
}

/* Fix untuk grid system yang tidak responsive */
@media only screen and (max-width: 768px) {
  .row.gx-3 {
    margin-left: -10px;
    margin-right: -10px;
  }
  
  .row.gx-3 > * {
    padding-left: 10px;
    padding-right: 10px;
  }
  
  .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 20px;
  }
}

/* Landscape orientation fixes */
@media only screen and (max-height: 500px) and (orientation: landscape) {
  .hero-section {
    min-height: 50vh;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
}

