/* ===================================================
   WISESA NIAGA TAMA - RESPONSIVE CSS
   Menambahkan responsiveness tanpa mengubah struktur
   =================================================== */

/* ── GLOBAL ─────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

/* ── HEADER & LOGO ──────────────────────────────── */
@media (max-width: 1199px) {
  .header .logo h1 {
    font-size: 1.1rem;
  }
  .header .logo img {
    max-height: 40px;
    width: auto;
  }
}

@media (max-width: 767px) {
  .header .logo h1 {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
  }
}

/* ── NAVIGATION ─────────────────────────────────── */
@media (max-width: 1199px) {
  /* Mobile nav toggle already handled by Bootstrap,
     just ensure the toggle button is visible */
  .mobile-nav-toggle {
    font-size: 1.5rem;
    cursor: pointer;
  }
}

/* ── HERO CAROUSEL ──────────────────────────────── */
@media (max-width: 767px) {
  #hero .carousel-container h2 {
    font-size: 1.4rem;
  }
  #hero .carousel-container p {
    font-size: 0.9rem;
  }
  #hero .carousel-item img {
    min-height: 280px;
    object-fit: cover;
  }

  /* hero_8 infographic image on index */
  main form input[type="image"],
  main > form input[type="image"] {
    width: 100% !important;
    height: auto !important;
  }
}

@media (max-width: 480px) {
  #hero .carousel-container h2 {
    font-size: 1.1rem;
  }
}

/* ── PAGE TITLE SECTION ─────────────────────────── */
@media (max-width: 767px) {
  .page-title {
    padding: 60px 0 30px;
  }
  .page-title h1 {
    font-size: 1.6rem;
  }
}

/* ── SERVICES SECTION ───────────────────────────── */
@media (max-width: 991px) {
  .services .row.g-0 {
    flex-wrap: wrap;
  }
  .services .col-lg-3.col-md-6 {
    width: 50%;
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 575px) {
  .services .col-lg-3.col-md-6 {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }
  .service-item svg {
    width: 120px !important;
    height: 120px !important;
  }
  .service-item svg image {
    width: 120px !important;
    height: 120px !important;
  }
}

/* ── PARTNERSHIP TABLE ──────────────────────────── */
/* Replace the fixed-width table with responsive layout */
article table[width="80%"] {
  width: 100% !important;
  max-width: 100%;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

article table[width="80%"] tr {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 8px 0;
}

article table[width="80%"] td {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

@media (max-width: 575px) {
  article table[width="80%"] td img {
    max-width: 120px !important;
    height: auto !important;
  }
}

/* ── STRUKTUR ORGANISASI IMAGE ──────────────────── */
@media (max-width: 1024px) {
  .service-item-content center img[width="1000"] {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
  }
}

/* ── BLOG / NEWS POSTS ──────────────────────────── */
@media (max-width: 767px) {
  #blog-posts-2 .col-lg-4 {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (min-width: 576px) and (max-width: 991px) {
  #blog-posts-2 .col-lg-4 {
    width: 50%;
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* ── BLOG DETAILS ───────────────────────────────── */
@media (max-width: 991px) {
  #blog-details .container .row .col-lg-8,
  #blog-details .container .row .col-lg-4 {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }
  .sidebar {
    margin-top: 2rem;
  }
}

/* ── CONTACT MAP & FORM ─────────────────────────── */
@media (max-width: 767px) {
  #contact .mb-5 iframe {
    height: 280px !important;
  }
  #contact .col-lg-4,
  #contact .col-lg-8 {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ── FOOTER ─────────────────────────────────────── */
@media (max-width: 991px) {
  .footer .col-md-6.col-lg-3 {
    width: 50%;
    flex: 0 0 50%;
    max-width: 50%;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 575px) {
  .footer .col-md-6.col-lg-3 {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }
  .footer .copyright .container {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ── TEAM SWIPER ────────────────────────────────── */
@media (max-width: 767px) {
  .site-section.slider-team-wrap .container {
    padding-left: 12px;
    padding-right: 12px;
  }
  .slider-nav {
    gap: 8px;
  }
}

/* ── VISION / CULTURE / HISTORY TEXT ───────────── */
@media (max-width: 767px) {
  .article h1 {
    font-size: 1.4rem;
  }
  .article ol li p,
  .article p {
    font-size: 0.95rem;
  }
}

/* ── AWARDS SECTION ─────────────────────────────── */
@media (max-width: 767px) {
  #services .col-lg-3.col-md-6 {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }
  #services .service-item svg image {
    width: 120px !important;
    height: 120px !important;
  }
}

/* ── HERO_8 INFOGRAPHIC (INDEX) ─────────────────── */
/* Mengikuti lebar carousel secara fleksibel */
.hero8-wrapper {
  width: 100%;
  display: block;
  line-height: 0; /* hapus gap bawah gambar */
}

.hero8-wrapper form {
  width: 100%;
  margin: 0;
  padding: 0;
  display: block;
}

.hero8-wrapper form input[type="image"] {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

/* ── INDEX INFOGRAPHIC IMAGE ────────────────────── */
@media (max-width: 1199px) {
  main form[action="/submit-form"] {
    display: block;
    width: 100%;
    overflow: hidden;
  }
  main form[action="/submit-form"] input[type="image"] {
    width: 100% !important;
    height: auto !important;
    display: block;
  }
}

/* ── GENERAL CONTAINER PADDING ON MOBILE ────────── */
@media (max-width: 575px) {
  .container,
  .container-fluid {
    padding-left: 16px;
    padding-right: 16px;
  }
  .testimonial-wrap .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ── BREADCRUMBS ────────────────────────────────── */
@media (max-width: 575px) {
  .breadcrumbs ol {
    flex-wrap: wrap;
    gap: 4px;
  }
}

/* ── SECTION TITLE ──────────────────────────────── */
@media (max-width: 575px) {
  .section-title h2 {
    font-size: 1.4rem;
  }
  .section-title p {
    font-size: 1rem;
  }
}

/* ── CALL TO ACTION (NEWSLETTER) ────────────────── */
@media (max-width: 767px) {
  #call-to-action .col-lg-6 {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 1rem;
  }
  .form-subscribe .form-group {
    flex-direction: column;
    gap: 8px;
  }
  .form-subscribe .form-group input[type="submit"] {
    width: 100%;
  }
}

/* ── TESTIMONIALS ───────────────────────────────── */
@media (max-width: 767px) {
  .testimonials .col-md-6 {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ── PREVENT HORIZONTAL OVERFLOW ────────────────── */
html, body {
  overflow-x: hidden;
}

@media (max-width: 767px) {
  .row {
    margin-left: 0;
    margin-right: 0;
  }
}

/* ── LANGUAGE SWITCHER ──────────────────────────── */
.language-switcher img {
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 2px rgba(0,0,0,0.2);
}

/* Mengatur kotak dropdown bahasa agar lebih kecil dan proporsional */
.navmenu .lang-dropdown ul {
  min-width: 100px !important;
  padding: 10px 0 !important;
}

/* Mengatur posisi dropdown di layar komputer agar tidak melebar ke luar layar */
@media (min-width: 1200px) {
  .navmenu .lang-dropdown ul {
    left: auto !important;
    right: 0 !important;
  }
}

.lang-dropdown img {
  border-radius: 2px;
  box-shadow: 0 0 2px rgba(0,0,0,0.2);
}