/* =========================================================
   SIEC Bangladesh - Frontend Responsive Hardening
   Loaded after all page-level CSS so these rules only correct
   narrow-screen/touch-device edge cases without redesigning pages.
   ========================================================= */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

img,
video,
iframe,
svg {
  max-width: 100%;
}

iframe {
  display: block;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

/* Avoid sticky hover-only UI on touch devices. */
@media (hover: none), (pointer: coarse) {
  .siec-course-card:hover,
  .siec-aus-course-card:hover,
  .siec-aus-fact-card:hover,
  .siec-srv-feature-card:hover,
  .siec-event-card:hover,
  .siec-uni-card:hover {
    transform: none;
  }

  .dest-single-item-card:hover .dest-card-img-src {
    transform: none;
  }

  .dest-single-item-card:hover .dest-card-hover-mask {
    opacity: 0;
    pointer-events: none;
  }

  .dest-single-item-card:hover .dest-card-body-bottom {
    opacity: 1;
  }
}

/* =========================================================
   Tablet and below
   ========================================================= */
@media (max-width: 991.98px) {
  /* Global spacing / wrapping */
  .container,
  .container-fluid,
  .siec-container,
  .siec-contact-container,
  .siec-about-v2-container,
  .siec-od-container {
    max-width: 100%;
  }

  /* ABOUT */
  .siec-about-v2-hero-panel {
    width: 100%;
  }

  .siec-about-v2-final-card {
    width: 100%;
  }

  /* SERVICE */
  .siec-srv-page-wrapper .siec-srv-img-box img {
    height: 240px;
  }

  .siec-srv-page-wrapper .siec-srv-form-box {
    padding: 26px;
  }

  /* COUNTRY */
  .siec-aus-nav-tabs-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .siec-aus-nav-tabs {
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
  }

  .siec-aus-nav-tabs .nav-link {
    white-space: nowrap;
  }

  /* COURSE DETAILS */
  .siec-detail-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .siec-detail-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* Long rich-text content must never create page-level overflow. */
  .siec-article-content,
  .siec-detail-copy,
  .siec-aus-text {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .siec-article-content table,
  .siec-article-content pre,
  .siec-article-content code {
    max-width: 100%;
  }

  .siec-article-content pre {
    overflow-x: auto;
  }
}

/* =========================================================
   Mobile
   ========================================================= */
@media (max-width: 767.98px) {
  /* iOS/Safari: 16px prevents focus zoom on form controls. */
  .siec-contact-form input,
  .siec-contact-form select,
  .siec-contact-form textarea,
  .siec-srv-page-wrapper input,
  .siec-srv-page-wrapper select,
  .siec-srv-page-wrapper textarea,
  .siec-counselling-form input,
  .siec-counselling-form select,
  .siec-counselling-form textarea,
  .siec-comment-form input,
  .siec-comment-form select,
  .siec-comment-form textarea,
  .siec-search-field,
  .siec-select {
    font-size: 16px !important;
  }

  /* HOME */
  .hero-slide-content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-card {
    max-width: 100%;
  }

  .siec-faq-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .siec-faq-tab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* ABOUT */
  .siec-about-v2-hero h1 {
    font-size: clamp(32px, 10vw, 39px);
  }

  .siec-about-v2-hero-actions .siec-about-v2-btn {
    min-width: min(100%, 220px);
  }

  .siec-about-v2-image-frame,
  .siec-about-v2-journey-photo-main {
    height: 300px;
  }

  /* CONTACT */
  .siec-contact-form-section,
  .siec-offices-section {
    padding-top: 45px;
    padding-bottom: 55px;
  }

  .siec-contact-form-wrapper {
    padding: 24px 20px;
  }

  .siec-contact-map-wrapper iframe {
    width: 100%;
    min-height: 300px;
  }

  .siec-radio-group {
    flex-wrap: wrap;
    gap: 12px 18px;
  }

  .siec-office-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .siec-office-tab-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* Touch-friendly office card flip. */
  .siec-office-card:hover .siec-office-card-inner {
    transform: none;
  }

  .siec-office-card.is-flipped .siec-office-card-inner {
    transform: rotateY(180deg);
  }

  /* OFFICE DETAILS: override late desktop polish rules. */
  .siec-office-detail-page .siec-od-hero {
    min-height: 260px;
  }

  .siec-office-detail-page .siec-od-hero-content {
    padding: 58px 0 48px;
  }

  .siec-office-detail-page .siec-od-hero-title {
    font-size: clamp(30px, 9vw, 42px);
  }

  .siec-office-detail-page .siec-od-form-card {
    padding: 24px 20px;
  }

  .siec-office-detail-page .siec-od-faq-answer {
    padding-right: 20px;
  }

  .siec-office-detail-page .siec-od-location-card {
    height: 220px;
  }

  /* SERVICE */
  .siec-srv-page-wrapper .siec-srv-hero-sec {
    padding: 34px 0 46px;
  }

  .siec-srv-page-wrapper .siec-srv-hero-title {
    font-size: clamp(26px, 8vw, 32px);
    line-height: 1.2;
  }

  .siec-srv-page-wrapper .siec-srv-form-box {
    padding: 22px 18px;
  }

  .siec-srv-page-wrapper .siec-srv-feature-card {
    padding: 22px;
  }

  /* COUNTRY */
  .siec-aus-hero-sec .d-flex.justify-content-between {
    align-items: flex-start !important;
  }

  .siec-aus-action-pill {
    white-space: normal;
  }

  .siec-aus-card-head,
  .siec-aus-card-foot {
    flex-wrap: wrap;
  }

  .siec-aus-meta-item {
    gap: 14px;
  }

  /* COURSE SEARCH */
  .siec-breadcrumb-bar {
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }

  .siec-breadcrumb-left {
    min-width: 0;
  }

  .siec-breadcrumb-nav {
    min-width: 0;
    flex-wrap: wrap;
  }

  .siec-breadcrumb-current {
    overflow-wrap: anywhere;
  }

  .siec-counselor-top-btn {
    justify-content: center;
  }

  .siec-mode-switch {
    width: 100%;
  }

  .siec-mode-btn {
    flex: 1 1 0;
    justify-content: center;
  }

  .siec-filter-controls,
  .siec-filter-controls .siec-select,
  .siec-filter-toggle-btn {
    width: 100%;
  }

  .siec-pagination-wrapper {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .siec-pagination {
    flex: 0 0 auto;
  }

  /* COURSE DETAILS */
  .siec-course-details-page .siec-detail-hero-inner {
    min-height: 300px;
  }

  .siec-detail-title {
    overflow-wrap: anywhere;
  }

  .siec-detail-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* BLOG */
  .siec-blog-card-img,
  .siec-country-img {
    width: 100%;
  }

  .siec-blog-filter .row > * {
    min-width: 0;
  }

  /* BLOG DETAILS */
  .siec-blog-details-wrapper .siec-blog-hero {
    height: 280px;
  }

  .siec-article-content img,
  .siec-article-content video,
  .siec-article-content iframe {
    width: auto;
    max-width: 100%;
    height: auto;
  }

  .siec-article-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* EVENT */
  .siec-events-toggle-group {
    display: flex;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .siec-toggle-btn {
    flex: 1 0 auto;
    white-space: nowrap;
    min-height: 44px;
  }

  .siec-event-overlay-box {
    padding: 14px;
  }

  .siec-event-card-title {
    overflow-wrap: anywhere;
  }
}

/* =========================================================
   Small phones
   ========================================================= */
@media (max-width: 575.98px) {
  .floating-container {
    right: 14px;
    bottom: 14px;
  }

  /* HOME */
  .hero-card {
    width: calc(100% - 8px);
    max-width: none;
  }

  .hero-btn-row {
    flex-direction: column;
  }

  .hero-btn-row .btn-hero {
    width: 100%;
  }

  /* ABOUT */
  .siec-about-v2-hero h1 {
    font-size: clamp(30px, 9.5vw, 35px);
  }

  .siec-about-v2-hero-actions {
    flex-direction: column;
  }

  .siec-about-v2-hero-actions .siec-about-v2-btn,
  .siec-about-v2-final-card .siec-about-v2-btn {
    width: 100%;
  }

  .siec-about-v2-image-frame,
  .siec-about-v2-journey-photo-main {
    height: 260px;
  }

  .siec-about-v2-final-card {
    padding: 30px 20px;
  }

  /* CONTACT */
  .siec-contact-container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .siec-contact-hero {
    height: 165px;
    border-bottom-left-radius: 32px;
    border-bottom-right-radius: 32px;
  }

  .siec-contact-hero-title {
    font-size: 1.8rem;
  }

  .siec-phone-group {
    flex-wrap: wrap;
  }

  .siec-country-code {
    width: 100% !important;
  }

  .siec-office-card {
    height: 250px;
  }

  /* OFFICE DETAILS */
  .siec-office-detail-page .siec-od-section {
    padding: 48px 0;
  }

  .siec-office-detail-page .siec-od-hero-content {
    padding: 50px 0 42px;
  }

  .siec-office-detail-page .siec-od-map,
  .siec-office-detail-page .siec-od-map iframe {
    min-height: 280px;
  }

  /* SERVICE */
  .siec-srv-page-wrapper .siec-srv-img-box img {
    height: 210px;
  }

  .siec-srv-page-wrapper .siec-srv-title-lg {
    font-size: 24px;
  }

  .siec-srv-page-wrapper .siec-srv-title-md {
    font-size: 21px;
  }

  .siec-srv-page-wrapper .siec-srv-btn {
    width: 100%;
    min-height: 44px;
  }

  /* COUNTRY */
  .siec-aus-hero-title {
    font-size: 24px;
  }

  .siec-aus-title-lg {
    font-size: 22px;
  }

  .siec-aus-cost-item {
    align-items: flex-start;
    padding: 14px;
  }

  .siec-aus-card-head {
    flex-direction: column;
  }

  .siec-aus-meta-item {
    flex-direction: column;
    gap: 3px;
  }

  .siec-aus-card-foot > * {
    width: 100%;
    text-align: center;
  }

  /* COURSE SEARCH */
  .siec-breadcrumb-bar {
    flex-direction: column;
  }

  .siec-breadcrumb-right,
  .siec-counselor-top-btn {
    width: 100%;
  }

  .siec-card-actions {
    flex-direction: column;
  }

  .siec-course-meta-grid {
    grid-template-columns: 1fr;
  }

  /* COURSE DETAILS */
  .siec-course-details-page .siec-detail-hero-inner {
    min-height: 270px;
  }

  .siec-detail-status-grid,
  .siec-career-grid,
  .siec-country-facts-grid {
    grid-template-columns: 1fr !important;
  }

  .siec-counselling-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  /* BLOG DETAILS */
  .siec-blog-details-wrapper .siec-blog-hero {
    height: 245px;
  }

  .siec-title-large {
    overflow-wrap: anywhere;
  }

  /* EVENT */
  .siec-events-hero {
    padding: 32px 0;
  }

  .siec-events-hero-title {
    font-size: 22px;
  }

  .siec-event-card {
    height: 320px;
  }

  .siec-counselor-pill {
    white-space: normal;
  }
}
