/**
 * @file
 * Responsive overrides for style.css + style2.css — جميع أحجام الشاشات.
 * Breakpoints: 1400 / 1200 / 992 / 768 / 576 / 480 / 375 / 320
 */

/* =============================================================================
   Large desktops down (≤1400px)
   ============================================================================= */
@media (max-width: 1399.98px) {
  .company-profile-section {
    padding-inline: clamp(24px, 4vw, 80px);
  }

  .project-tabel {
    padding-inline: clamp(24px, 5vw, 80px);
  }

  .project-categories-inner {
    padding-inline: clamp(24px, 5vw, 80px);
  }

  .view-history .bodies-wrapper {
    padding-inline: clamp(24px, 5vw, 73px);
  }

  .about-page-section .node__content {
    padding-inline: clamp(24px, 5vw, 70px);
  }
}

/* =============================================================================
   ≤1200px — شريط التنقل، السلايدر، الهيدر
   ============================================================================= */
@media (max-width: 1200px) {
  .navbar-toggler {
    width: 40px;
    height: 32px;
    position: relative;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
  }

  .navbar-toggler-icon,
  .navbar-toggler-icon::before,
  .navbar-toggler-icon::after {
    all: unset;
    display: block;
    background-color: #FDC700;
    width: 100%;
    height: 4px;
    border-radius: 3px;
    position: absolute;
    transition: all 0.35s ease-in-out;
  }

  .navbar-toggler-icon {
    top: 50%;
    transform: translateY(-50%);
  }

  .navbar-toggler-icon::before {
    content: "";
    top: -12px;
  }

  .navbar-toggler-icon::after {
    content: "";
    top: 12px;
  }

  .navbar-toggler.active .navbar-toggler-icon {
    background: transparent;
  }

  .navbar-toggler.active .navbar-toggler-icon::before {
    top: 0;
    transform: rotate(45deg);
  }

  .navbar-toggler.active .navbar-toggler-icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  #CollapsingNavbar {
    max-height: none !important;
    overflow: visible !important;
  }

  .home-slider .hamza-wrapper .field--type-string h2 a {
    font-size: clamp(28px, 4.5vw, 42px);
    white-space: normal;
  }

  .home-slider .hamza-wrapper p {
    font-size: clamp(16px, 2.2vw, 20px);
  }

  .home-slider .field--name-field-brief {
    font-size: clamp(22px, 3.5vw, 36px);
    white-space: normal;
  }

  .about-home-section .node--view-mode-about-home .node__content {
    padding-inline: clamp(16px, 4vw, 31px);
  }

  .region-top-header nav {
    width: unset;
    max-width: unset;
  }

  #navbar-top {
    padding: 11px 13px;
    padding-inline: clamp(16px, 3vw, 40px);
  }

  #navbar-main {
    padding-inline: clamp(16px, 3vw, 40px) !important;
  }

  .navbar-expand-lg .navbar-nav .dropdown-menu .dropdown-item>a {
    width: 100%;
    max-width: min(320px, 92vw);
    line-height: 1.4;
  }

  .inner-image {
    height: auto;
    min-height: 280px;
  }

  .inner-image img {
    height: auto !important;
    min-height: 280px;
    max-height: 55vh;
  }

  .inner-image .views-field-fieldset .views-field-title {
    font-size: clamp(28px, 5vw, 48px);
    line-height: 1.15;
  }

  .inner-image .views-field-fieldset .views-field-field-brief {
    font-size: clamp(15px, 2vw, 20px);
  }

  .project-categories-section .view-content {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-inline: clamp(20px, 4vw, 46px);
  }

  .in-progress-complete-section {
    padding-inline: clamp(20px, 4vw, 46px);
  }

  .certificate-section .view-content {
    flex-wrap: wrap;
    gap: 20px;
  }

  .site-footer .container {
    padding-inline: clamp(20px, 4vw, 48px);
  }
}

/* =============================================================================
   ≤992px — أقراص، عمود واحد لأقسام كثيرة
   ============================================================================= */
@media (max-width: 991.98px) {
  #navbar-top {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
  }

  #block-bootstrap-barrio-subtheme-phoneemail ul {
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
  }

  #block-bootstrap-barrio-subtheme-phoneemail ul li:nth-child(1) {
    padding-inline-end: 16px;
    border-right: none;
    height: auto;
  }

  .header {
    position: relative;
  }

  .navbar-expand-lg .navbar-collapse {
    padding-left: 0 !important;
    gap: 16px !important;
  }

  .home-slider .node__content {
    min-height: 70vh;
    height: auto;
  }

  .home-slider .hamza-wrapper {
    height: auto;
    min-height: 50vh;
    padding-inline: 16px;
  }

  .home-slider .custom-swiper-nav {
    padding-inline: clamp(16px, 4vw, 40px);
    top: auto;
    bottom: 24px;
    transform: translate(-50%, 0);
    top: unset;
  }

  .vision-commitment-wrapper .layout.row.layout-builder__layout {
    flex-wrap: wrap;
    flex-direction: column;
  }

  .vision-commitment-wrapper .layout.row.layout-builder__layout>.col-lg-6 {
    width: 100% !important;
    max-width: 100%;
  }

  .vision-commitment-wrapper .view-display-id-block_1 .node__content,
  .vision-commitment-wrapper .view-display-id-block_2 .node__content {
    min-height: 0;
  }

  .company-profile-section {
    padding-block-end: 80px;
  }

  .company-profile-section .col-lg-6 {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0;
  }

  .company-profile-section .view-display-id-block_1 .field--name-field-cardprof {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .company-profile-section .view-display-id-block_2 .node__content .file--application-pdf {
    position: static;
    opacity: 0;
    width: 1px;
    height: 1px;
  }

  .view-history .body-card-wrapper .field--name-field-cardhis {
    flex-wrap: wrap;
  }

  .project-categories-inner .views-row .taxonomy-term .content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .project-categories-inner .field--name-field-card .field__items {
    grid-template-columns: 1fr;
  }

  .inner-project-wrapper .inner-project-main-wrapper {
    grid-template-columns: 1fr;
    padding: 24px 16px;
    gap: 32px;
  }

  .inner-project-wrapper .inner-project-main-wrapper .field--name-title h2,
  .inner-project-wrapper .inner-project-main-wrapper .field--name-title a {
    font-size: clamp(28px, 6vw, 40px);
    line-height: 1.2;
  }

  .inner-project-wrapper .kpi-wrapper {
    grid-template-columns: 1fr;
  }

  .inner-project-wrapper .field--name-field-key-components .field__items {
    grid-template-columns: 1fr;
  }

  .inner-career-section .info-submit-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .inner-career-section .info-submit-wrapper .views-field-nothing {
    align-self: stretch;
  }

  .inner-career-section .info-submit-wrapper .views-field-nothing a {
    width: 100%;
    max-width: 200px;
  }

  .map-wrapper iframe {
    height: min(400px, 50vh);
  }

  .page-node-44 .node--type-layout-page,
  .page-node-40 .node--type-layout-page {
    border-radius: 24px 24px 0 0;
    margin-top: -40px;
  }

  .view-advanced-search .view-content {
    padding-inline: 16px;
  }

  .view-advanced-search .view-content .views-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* =============================================================================
   ≤900px
   ============================================================================= */
@media (max-width: 900px) {
  .navbar-brand {
    display: flex;
    justify-content: center;
  }

  .navbar-collapse img {
    height: 36.018px;
  }

  #navbar-main {
    background: rgb(0 0 0 / 80%) !important;
    padding-inline: 12px !important;
  }

  .about-home-section .node--view-mode-about-home .node__content {
    flex-direction: column;
    text-align: center;
  }

  .about-home-section .node--view-mode-about-home .field--name-title h2::after {
    margin-left: auto;
    margin-right: auto;
  }

  .project-categories-section .view-content {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .in-progress-complete-section .view-header h2::before {
    height: 32px;
  }


  #navbar-main img {
    height: 36px;
  }



}

/* =============================================================================
   ≤768px — أجهزة لوحية صغيرة / هواتف كبيرة
   ============================================================================= */
@media (max-width: 767.98px) {
  .contact-main {
    padding: 40px 16px;
  }

  .contact-main .field--name-field-card>.field__item {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .Careercards-Section .field--name-field-cardprof>.field__item {
    flex: 1 1 100%;
  }

  .certification-about-page-section .view-certifications-accreditations .views-row {
    width: calc(50% - 12px);
    min-width: 140px;
  }

  .about-page-section .chairman-wrapper .field--name-title a {
    right: 0;
  }

  .about-page-section .chairman-wrapper .field--name-title h2 ::before {
    left: -36px;
  }

  .gallery-section .form-radios,
  .new-gallary-section .form-radios {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .gallery-section .form-check-label,
  .new-gallary-section .form-check-label {
    padding: 8px 14px;
    font-size: 13px;
    white-space: normal;
  }

  .project-tabel .view-projects.view-display-id-block_4 table.views-table thead th,
  .project-tabel .view-projects.view-display-id-block_4 table.views-table tbody td {
    padding: 12px 14px;
    font-size: 13px;
  }
}

/* =============================================================================
   ≤576px — هواتف
   ============================================================================= */
@media (max-width: 575.98px) {
  html {
    font-size: 56.25%;
  }

  .home-slider .hamza-wrapper .field--type-string h2 a {
    font-size: clamp(20px, 6vw, 28px);
  }

  .home-slider .hamza-wrapper p {
    font-size: 16px;
  }

  .home-slider .field--type-link a {
    padding: 12px 24px;
    font-size: 14px;
  }

  .home-slider .custom-swiper-nav {
    top: auto;
    bottom: 16px;
    padding-inline: 16px;
  }

  .home-slider .hamza-wrapper .field--type-string h2 a {
    white-space: normal;
  }

  .home-slider .hamza-wrapper .field--name-title {
    padding-inline: 16px;
  }

  .home-slider .field--name-field-brief {
    padding-inline: 12px;
  }

  .project-categories-section .view-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 16px;
    gap: 8px;
  }

  .project-categories-section {
    padding: 48px 0;
  }

  .in-progress-complete-section .view-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .in-progress-complete-section .node--view-mode-in-progress .field--name-field-image-media img,
  .in-progress-complete-section .node--view-mode-completed .field--name-field-image-media img {
    height: 240px;
  }

  .certificate-section .view-content {
    flex-direction: column;
    padding: 0 16px;
  }

  .about-home-section {
    padding: 40px 0;
  }

  .open-form-section .view-career .title-time-wrapper::after {
    right: 8px;
  }

  .site-footer__top {
    gap: 24px;
  }

  .site-footer .container {
    padding-inline: 20px;
  }

  .home-slider .hamza-wrapper .field--type-string h2 {

    font-size: 21.805px;
    white-space: wrap;
  }


}

/* =============================================================================
   ≤500px — هواتف ضيقة (يتوافق مع القواعد السابقة)
   ============================================================================= */
@media (max-width: 500px) {
  .home-slider .hamza-wrapper .field--type-string h2 a {
    font-size: 20.805px;
  }

  .home-slider .hamza-wrapper p {
    font-size: 17.722px;
  }

  .home-slider .custom-swiper-nav {
    top: 72%;
    padding-inline: 23px;
  }

  .home-slider .hamza-wrapper .field--type-string h2 a {
    white-space: pre-wrap;
  }

  .home-slider .hamza-wrapper .field--name-title {
    padding-inline: 24px;
  }

  .project-categories-section .view-content {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 16px;
  }

  .in-progress-complete-section .view-content {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* =============================================================================
   ≤480px
   ============================================================================= */
@media (max-width: 479.98px) {

  #navbar-top .nav-link,
  #navbar-top a {
    font-size: 12px;
  }

  .menu--account a {
    padding: 6px 14px;
    font-size: 13px;
  }

  .certification-about-page-section .view-certifications-accreditations .views-row {
    width: 100%;
    max-width: 280px;
    margin-inline: auto;
  }

  .search-section-wrapper #edit-title {
    height: 56px;
    font-size: 16px;
    padding-left: 48px;
  }

  .project-gallery-modal__dialog {
    width: 96vw;
    margin: 2vh auto;
  }

  .project-gallery-modal__thumb {
    width: 80px;
    height: 62px;
  }

  .project-tabel .view-projects.view-display-id-block_4 table.views-table thead th,
  .project-tabel .view-projects.view-display-id-block_4 table.views-table tbody td {
    padding: 9px 10px;
    font-size: 10px;

  }

  .project-tabel table.views-table.views-view-table .views-field-title a {

    font-size: 11.148px;

  }

  .project-tabel table.views-table.views-view-table td.views-field-view-node a {

    font-size: 9.361px;

  }

  .project-categories-inner .view-content {
    .views-row .taxonomy-term .content {

      grid-template-columns: 1fr;

    }
  }

  .project-categories-inner {

    padding-block: 20px;
  }


  .certification-about-page-section .view-certifications-accreditations .view-header h2 {
    font-size: 24px;
  }

  .about-page-section .node__content {
    padding-inline: 56px;
  }

  .project-categories-inner .field--name-name h2 {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 22px;
    position: relative;
    color: #111;
  }

  .company-profile-section .view-display-id-block_1 .field--name-title {
    font-size: 24px;
  }

  .open-form-section .view-career .view-content.row {

    padding-inline: 13px;
  }

  .open-form-section .view-career .view-header {
    padding-inline: 13px;
  }

  .open-form-section .block-webform .webform-button--submit {
    padding: 12px 13px;
    font-size: 20px;

  }

  .inner-career-section .item-list ul.list-group li.list-group-item {
    gap: 10px;
  }


  .inner-career-section .views-field-field-responsipilites>.views-label,
  .inner-career-section .views-field-field-requirements>.views-label {

    font-size: 20px;
  }

  .get-in-touch-wrapper .block-content-basic h1 {
    font-size: 28px;
  }

  .get-in-touch-wrapper .block-content-basic .contact-container {

    padding-inline: 20px;
  }

  .vision-commitment-wrapper .layout.row.layout-builder__layout {

    padding-inline: 14px;
  }


  .in-progress-complete-section {

    padding: 29px 14px;
  }

  .certificate-section {

    padding: 45px 0;
  }

  .project-tabel .view-projects.view-display-id-block_4 table.views-table thead th,
  .project-tabel .view-projects.view-display-id-block_4 table.views-table tbody td {
    padding: 8px 6px;
    font-size: 10px;
  }

  .region-top-header {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    padding-inline: 10px;
  }


  .company-profile-section .view-display-id-block_2 .node__content {

    position: relative;
  }

  .company-profile-section .view-display-id-block_2 .field--name-field-pdf {

    position: absolute;
    bottom: 0;
    right: 57px;
  }

  .Careercards-Section .field--name-field-cardprof {
    gap: 22px;
    padding-inline: 20px;
  }

  .certificate-section .views-row {

    width: 100%;
  }

  .certificate-section .node--view-mode-certifications-accreditations {
    width: 100%;
  }



  @media (max-width: 450px) {
    .new-gallary-section #edit-field-project-sector-target-id--wrapper>legend {
      display: none;
    }

    .new-gallary-section .new-gallary-toggle-btn {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 15px 16px;
      border: 1px solid rgba(16, 47, 76, 0.12);
      border-radius: 16px;
      background: #fff;

      cursor: pointer;
      transition: all 0.3s ease;
      position: relative;
      z-index: 2;
    }

    .new-gallary-section .new-gallary-toggle-btn:hover,
    .new-gallary-section .new-gallary-toggle-btn:focus {
      border-color: #102f4c;
      box-shadow: 0 16px 32px rgba(16, 47, 76, 0.14);
    }

    .new-gallary-section .new-gallary-toggle-left {
      display: flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }

    .new-gallary-section .new-gallary-toggle-bars {
      width: 22px;
      display: flex;
      flex-direction: column;
      gap: 4px;
      flex-shrink: 0;
    }

    .new-gallary-section .new-gallary-toggle-bars span {
      display: block;
      width: 100%;
      height: 2px;
      border-radius: 999px;
      background: #102f4c;
      transition: all 0.3s ease;
    }

    .new-gallary-section .new-gallary-toggle-btn.is-open .new-gallary-toggle-bars span:nth-child(1) {
      transform: translateY(6px) rotate(45deg);
    }

    .new-gallary-section .new-gallary-toggle-btn.is-open .new-gallary-toggle-bars span:nth-child(2) {
      opacity: 0;
    }

    .new-gallary-section .new-gallary-toggle-btn.is-open .new-gallary-toggle-bars span:nth-child(3) {
      transform: translateY(-6px) rotate(-45deg);
    }

    .new-gallary-section .new-gallary-toggle-text {
      color: #102f4c;
      font-size: 15px;
      font-weight: 600;
      line-height: 1.3;
      text-align: left;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .new-gallary-section .new-gallary-toggle-plus {
      font-size: 22px;
      line-height: 1;
      color: #102f4c;
      flex-shrink: 0;
      display: none;
    }

    .new-gallary-section .new-gallary-toggle-menu {
      margin-top: 10px;
      padding: 14px;
      border-radius: 16px;
      background: #fff;
      border: 1px solid #edf0f4;
      box-shadow: 0 18px 35px rgba(0, 0, 0, 0.08);
      animation: newGallaryFadeDown 0.3s ease;
    }

    .new-gallary-section .new-gallary-toggle-menu .d-flex.flex-wrap {
      display: block !important;
    }

    .new-gallary-section .new-gallary-toggle-menu #edit-field-project-sector-target-id--wrapper {
      margin-bottom: 14px !important;
    }

    .new-gallary-section .new-gallary-toggle-menu .fieldset-wrapper {
      margin-top: 0;
    }

    .new-gallary-section .new-gallary-toggle-menu .form-radios {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .new-gallary-section .new-gallary-toggle-menu .form-check {
      margin: 0;
      padding: 0;
      position: relative;
    }

    .new-gallary-section .new-gallary-toggle-menu .form-check-input {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }

    .new-gallary-section .new-gallary-toggle-menu .form-check-label {
      display: block;
      padding: 12px 14px;
      border-radius: 12px;
      background: #f8fafc;
      border: 1px solid transparent;
      color: #102f4c;
      font-size: 14px;
      font-weight: 500;
      line-height: 1.4;
      cursor: pointer;
      transition: all 0.25s ease;
    }

    .new-gallary-section .new-gallary-toggle-menu .form-check-label:hover {
      background: rgba(16, 47, 76, 0.06);
      border-color: rgba(16, 47, 76, 0.14);
      transform: translateX(4px);
    }


    .new-gallary-section .new-gallary-toggle-menu #edit-actions--2 {
      margin: 0 !important;
    }

    .new-gallary-section .new-gallary-toggle-menu .form-actions .btn,
    .new-gallary-section .new-gallary-toggle-menu .form-actions button {
      width: 100%;
      border-radius: 12px;
      padding: 12px 16px;
      font-size: 14px;
      font-weight: 600;
      box-shadow: none;
    }

    @keyframes newGallaryFadeDown {
      from {
        opacity: 0;
        transform: translateY(-8px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
  }

  .new-gallary-section .gallery-projects-view .view-content.row {

    padding-inline: 3px;
  }



}

/* =============================================================================
   ≤375px
   ============================================================================= */
@media (max-width: 375px) {

  .home-slider .swiper-button-next,
  .home-slider .swiper-button-prev {
    width: 40px;
    height: 40px;
  }

  .project-categories-section .field--name-name h2 {
    font-size: 13px;
  }

  .inner-career-section .view-career .views-row {
    padding: 24px 16px;
  }

  #navbar-top {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 9px 0px;
  }
}

/* =============================================================================
   ≤320px — شاشات صغيرة جداً
   ============================================================================= */
@media (max-width: 320px) {
  .home-slider .hamza-wrapper {
    gap: 16px;
  }

  .contact-main .paragraph--type--card {
    padding: 20px 14px;
  }

  .get-in-touch-wrapper .block-webform {
    padding: 20px 16px;
  }
}

/* =============================================================================
   Landscape / ارتفاع منخفض
   ============================================================================= */
@media (max-height: 500px) and (orientation: landscape) {
  .home-slider .node__content {
    min-height: 100vh;
    height: auto;
  }

  .home-slider .hamza-wrapper {
    min-height: auto;
    padding-block: 24px;
  }
}