@media (max-width: 767px) {
  html {
    overflow-x: hidden;
  }

  .top-video-file {
    height: 100vh;
  }

  .main-navbar {
    padding: 10px 20px;
  }

  .main-content-section {
    min-height: 100vh;
    padding: 120px 20px 60px;
    background: url("./images/Emirates Financial Group13.jpg") center center / cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
  }

  .main-content-section .third-section {
    width: 100%;
    margin: 0;
    z-index: 2;
  }

  .footer-logos {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: auto;
    align-items: flex-start;
    width: 100%;
    align-items: center;
  }

  .footer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  .institutional-section3 {
    position: relative;
    height: 100vh;
  }

  .institutional-section3 .overlay {
    background: rgba(3, 0, 0, 0.7);
  }

  .second-head1 {
    padding-bottom: 10px;
    font-size: 10px;
    text-align: right;
  }

  .institutional-content2 {
    display: flex;
    flex-direction: column;
    gap: 30px;
    transform: translateX(0%);
  }

  .institutional-section1 {
    position: relative;
    height: 100vh;
    background: url(./images/gulfmap.jpeg) center / cover no-repeat;
    color: white;
    overflow: hidden;
    display: flex;
    justify-content: end;
    align-items: center;
    padding: 0px 50px;
  }

  .institutional-content1 {
    display: flex;
    flex-direction: column;
    gap: 15px;
    transform: translateX(0%);
  }

  .institutional-grid2 {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    padding-left: 30px;
    border-left: 1px solid #ffffff;
  }

  .institutional-section2 {
    position: relative;
    height: auto;
    min-height: 100vh;
    background: url(./images/Emirates-groups.jpg) center / cover no-repeat;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
    box-sizing: border-box;
  }

  .experts-card {
    width: 280px;
    height: 180px;
  }

  .institutional-grid3 {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    padding-left: 30px;
    border-left: 1px solid #ffffff;
  }

  .experts-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 20px;
    padding-bottom: 0px;
  }

  .top-video-file1 video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    object-fit: cover;
    transform: none;
  }

  .category {
    font-size: 8px;
  }

  .menu {
    display: flex;
    width: 15px;
    height: 10px;
  }

  .logo {
    height: auto;
    width: 255px;
    cursor: pointer;
  }


  /* top-sectiion */
  .top-sectiion {
    padding: 20px 0px;
    gap: 10px;

  }

  .institutional-grid-head {
    font-size: 12px;
  }

  .bottom-logo {
    height: 20px;
    width: 130px;
  }

  .category-section {
    gap: 9px;
    display: none;
  }

  .category-section.b {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 10px;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    max-height: 0;
    overflow: hidden;
    pointer-events: none;

    transition: opacity 1s ease, transform 1s ease, max-height 0.6s ease, visibility 1s ease;
  }

  .category-section.b.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 300px;
    /* adjust for your menu height */
    pointer-events: auto;
  }


  .category-section.b .category {
    font-size: 12px;
    margin: 0;
  }

  .category-section {
    display: none;
  }


  /* third-section */
  .third-section {
    padding: 0px 0px;
    gap: 25px;
  }

  .third-section {
    margin-top: 0vh;
    /* pushes it down */
    margin-bottom: 0px;
    /* pushes it up */
  }

  .third-section-top {
    width: 100%;
  }

  .heading {
    font-size: 30px;
    width: 100%;
    line-height: 1.0em;
  }

  .second-head {
    width: auto;
  }

  .third-section-bottom {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .third-section-bottom-left {
    width: 100%;
  }

  .third-section-bottom-right {
    width: 100%;
    gap: 10px;
    align-items: center;
    /* Center arrow on mobile */
  }

  .egs-frame {
    display: none;
  }

  .overview-row {
    align-items: center;
    /* Center logo overview line on mobile */
    text-align: center;
  }

  .company-line.b {
    align-self: center;
    /* Center the line */
    width: 50%;
  }

  .length-arrow {
    height: 10px;
    width: auto;
  }

  .company-overview-text {
    font-size: 10px;
  }

  .company-line {
    width: 40%;
    height: 1px;
    background-color: #ffffff;
  }


  .overview-row {
    gap: 5px;
  }

  /* institutional-section */
  .institutional-section {
    height: auto;
    min-height: 100vh;
    padding: 80px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  .institutional-section .overlay {
    height: 100%;
  }

  .heading.b {
    font-size: 24px;
    width: 100%;
    padding-left: 0;
    text-align: center;
  }

  .institutional-section1 .heading.b {
    font-size: 24px;
    width: 100%;
    padding-left: 0px;
    text-align: center;
  }

  .institutional-grid {
    width: 100%;
    padding-left: 0;
    text-align: center;
  }

  .institutional-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    transform: none;
    width: 100%;
  }

  .text {
    font-size: 10px;
    font-weight: 100;
    line-height: 1.4;
    word-spacing: -0.05rem;
  }

  .text.i {
    font-size: 9px;
    font-weight: 100;
    line-height: 1.4;
    word-spacing: -0.05rem;
  }

  .institutional-section .content {
    padding: 30px 0px;
    gap: 30px;
    width: 100%;
  }

  .institutional-section1 .content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 30px;
    width: 100%;
  }

  .institutional-content1 {
    display: flex;
    flex-direction: column;
    gap: 20px;
    transform: none;
  }

  .institutional-grid1 {
    width: 100%;
    padding-left: 0;
    text-align: center;
  }

  .body-content-grid {
    gap: 5vh;
    width: auto;
    height: auto;
    padding: 20px 20px;
  }

  .team-text {
    width: 100%;
    font-size: 20px;
    line-height: 1.4em;
  }

  .experts-main-title {
    font-size: 20px;
  }

  .experts-header {
    text-align: center;
    margin-bottom: 50px;
  }

  .team-grid-section {
    width: 100%;
  }

  .team-text.b {
    font-size: 13px;
  }

  .text.b {
    width: 100%;
    font-size: 8px;
    word-spacing: -0.05rem;
  }

  .text.c {
    font-size: 8px;
    word-spacing: -0.05rem;
  }

  /* body-content */
  .body-content {
    padding: 8vh 0px;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* image-section */
  .image-section {
    height: 30vh;
  }

  /* bottom-section */
  .bottom-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px 10px;
    box-sizing: border-box;
  }

  .bottom-section1 {
    gap: 0vh;
    padding: 50px 0px 0px;
  }

  .bottom-section1 {
    gap: 30px;
    height: auto;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    box-sizing: border-box;
  }

  .heading1 {
    font-size: 24px;
    font-weight: 500;
    font-family: "Libre Baskerville", serif;
    margin: 0;
    color: #ffffff;
    text-align: center;
    letter-spacing: -0.02em;
    line-height: 1.4rem;
  }

  .text1 {
    font-size: 11px;
    margin: 0;
    color: #d7d7d7;
    font-weight: 100;
    line-height: 1.5;
    text-align: center;
    padding-bottom: 20px;
  }

  .capital-section-top {
    display: flex;
    flex-direction: column;
    gap: 50px;
    padding: 5vh 0px;
    width: 100%;
  }

  .team-text.c {
    font-size: 14px;
    line-height: 1.3em;
    width: 100%;
  }

  .bottom-logo-section {
    padding-top: 8vh;
  }

  .bottom-logo-grid {
    width: 30%;
  }

  .bottom-logo-grid-head {
    font-size: 12px;
    text-align: center;
  }

  .capital-section {
    padding: 0px 20px;
  }

  .body-content-grid.d {
    gap: 40px;
    width: auto;
    padding: 20px;
    box-sizing: border-box;
    /* prevents overflow */
  }


  .team-text.d {
    width: 100%;
    text-align: center;
    font-size: 13px;
    line-height: 1.5em;
    font-weight: 300;
  }

  .institutional-section3 {
    height: auto;
    min-height: 100vh;
    padding: 80px 20px;
    box-sizing: border-box;
  }

  .institutional-section3 .content {
    width: 100%;
    gap: 30px;
  }

  .institutional-content3 {
    gap: 40px;
  }

  .institutional-grid-head a {
    font-size: 16px;
  }

  .institutional-grid2 {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding-left: 15px;
    margin-bottom: 20px;
  }

  .institutional-grid3 {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding-left: 15px;
  }

  /* Membership Benefits responsive tweaks */
  .section2-container {
    padding: 60px 20px;
  }

  .section2-title {
    font-size: 26px;
    margin-bottom: 30px;
  }

  .section2-benefit-card {
    min-height: 140px;
    padding: 20px;
  }

  .section2-card-head {
    font-size: 16px;
  }

  .section2-card-title {
    font-size: 11px;
    line-height: 1.4;
  }

  .experts-description {
    font-size: 10px;
    padding: 0 15px;
  }

  .section2-benefits-grid {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .section2-bottom-row {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  /* Expertise & Approach Full-Screen Wrappers */
  .expertise-wrapper,
  .contact-wrapper,
  .securities-wrapper {
    height: auto !important;
    min-height: 100vh;
    padding: 120px 20px 60px !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .expertise-content,
  .constrained-container,
  .securities-content,
  .expertise-section-content {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    gap: 30px !important;
  }

  .expertise-title,
  .securities-left-title {
    font-size: 2.2rem !important;
    width: 100% !important;
    margin-bottom: 20px;
  }

  .expertise-description,
  .securities-description-paragraph {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 11px !important;
    line-height: 1.6 !important;
  }

  /* Our Team Profiles Stacking */
  .leader-profile-section {
    flex-direction: column !important;
    gap: 40px !important;
    padding: 40px 0 !important;
  }

  .leader-profile-section-grid.l,
  .leader-profile-section-grid.r {
    width: 100% !important;
    text-align: left !important;
  }

  .profile-pic {
    width: 100% !important;
    max-width: 320px;
    height: auto !important;
    margin: 0 auto !important;
    display: block !important;
  }

  .profile-pic.m,
  .profile-pic.b-m,
  .profile-pic.c-m {
    display: none !important;
    /* Hide the mobile-only duplicates if any, use standard pics */
  }

  /* Securities Page Layout */
  .securities-top,
  .securities-bottom {
    display: flex !important;
    flex-direction: column !important;
    gap: 40px !important;
  }

  .securities-right {
    padding-top: 0 !important;
  }

  .securities-bottom-left {
    display: none;
  }

  .name-section {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 15px !important;
  }

  /* Careers & Sub-page layout */
  .careers-wrapper {
    padding: 100px 20px 60px !important;
  }

  .careers-top {
    display: flex !important;
    flex-direction: column !important;
    gap: 40px !important;
  }

  .careers-left-title {
    font-size: 28px !important;
    margin-bottom: 20px !important;
  }

  /* Team Profile specific tweaks */
  .leader-profile-section-grid.l {
    order: 2;
  }

  .leader-profile-section-grid.r {
    order: 1;
    margin-bottom: 20px;
  }

  .profile-pic {
    max-height: 400px;
    width: auto !important;
  }
}

/* ========== Responsive Styles for Tablets (768px – 991.98px) ========== */
@media (min-width: 768px) and (max-width: 991.98px) {

  /* Main layout */
  .main-content-section {
    width: 100%;
    height: auto;
    padding: 10vh 0;
    gap: 15vh;
  }

  /* Top navigation */
  .top-sectiion {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: 0 auto;
  }

  .logo {
    height: 50px;
    width: auto;
  }

  .category-section {
    gap: 25px;
  }

  .category {
    font-size: 11px;
  }

  .menu {
    display: none;
    /* still hide burger at this size */
  }

  /* Hero / third-section */
  .third-section {
    gap: 20px;
    width: 90%;
    margin: 0 auto;
  }

  .heading {
    font-size: 28px;
    width: 80%;
  }

  .second-head {
    font-size: 16px;
    width: 75%;
  }

  .third-section-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
  }

  .third-section-bottom-left {
    width: 100%;
  }

  .third-section-bottom-right {
    width: 100%;
    align-items: flex-start;
  }

  .company-overview-text {
    font-size: 12px;
  }

  .company-line {
    width: 40%;
  }

  /* Institutional section */
  .institutional-section {
    height: 70vh;
    padding: 10vh 30px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }

  .institutional-section .content {
    width: 100%;
    gap: 25px;
  }

  .institutional-head-section {
    text-align: left;
  }

  .institutional-grid {
    width: 80%;
    padding-left: 20px;
    gap: 10px;
  }

  .institutional-grid-head {
    font-size: 13px;
  }

  .text.i {
    font-size: 12px;
  }

  /* Body content section */
  .body-content {
    height: auto;
    padding: 10vh 0;
  }

  .team-text {
    font-size: 24px;
    width: 80%;
  }

  .team-text.c {
    font-size: 16px;
    width: 80%;
  }

  .arrow-section {
    align-items: flex-end;
  }

  .bottom-logo {
    width: 140px;
  }

  /* Image section */
  .image-section {
    height: 70vh;
  }

  /* Bottom section */
  .bottom-section {
    gap: 10vh;
  }

  .bottom-section1 {
    gap: 10vh;
    height: 22vh;
  }


  .body-content-grid {
    width: 90%;
    gap: 10vh;
    height: auto;
  }

  .body-content-grid.d {
    width: 90%;
    gap: 40px;
  }

  .main-img {
    height: auto;
  }

  .capital-section-top {
    padding: 0;
  }

  /* Footer */
  .footer {
    width: 95%;
    padding: 10vh 10px;
    padding-top: 0;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer-logos {
    width: 100%;
    justify-content: flex-start;
    gap: 20px;
  }

  .footer-logo {
    height: 50px;
  }

  .footer-logo.small {
    height: 35px;
  }

  .footer-contact {
    flex-direction: row;
    align-items: flex-start;
    gap: 5px;
    width: 100%;
  }

  .footer-contact div {
    width: 25%;
    text-align: left;
  }

  .address {
    width: 100%;
    font-size: 9px;
  }

  .email,
  .phone {
    text-align: left;
    font-size: 11px;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 2px;
    font-size: 10px;
  }

  .footer-link-section {
    width: 100%;
  }

  .footer-note {
    font-size: 10px;
    margin-top: 0px;
  }

  /* top-video-file */
  .top-video-file {
    position: relative;
    width: 100%;
    height: 80vh;
    overflow: hidden;
    z-index: 1;
  }
}


@media (min-width: 992px) and (max-width: 1200px) {

  /* Hero / third-section */
  .third-section {
    width: 80%;
    margin: 0 auto;
  }

  /* Main layout */
  .main-content-section {
    width: 100%;
  }

  .top-sectiion {
    width: 80%;
    margin: 0 auto;
  }

  .footer-section {
    width: 100%;
  }

  .footer-top {
    gap: 10px;
  }
}

@media (max-width: 767px) {
  .text.i {
    font-size: 12px;
    font-weight: 100;
    line-height: 1.4;
    word-spacing: -0.05rem;
  }
}

@media (min-width: 1201px) and (max-width: 1400px) {}

/* footer */
.footer {

  display: flex;
  flex-direction: column;
  gap: 5px;
  /* width: 100%; */
  margin: 0 auto;
  padding: 5vh 0px;
  position: relative;
  z-index: 2;

}

.footer-link-section {
  display: none;
}

@media (max-width: 767px) {
  .footer-links {
    display: none;
  }
}

/*  */
@media (max-width: 767px) {
  .footer-cateagory-section {
    text-align: left;
    width: 100%;
  }

}

@media (max-width: 767px) {
  .footer-content {
    flex-direction: column-reverse;
    align-items: center;
    padding: 0px 10px;
  }

  .footer-contact-left {
    overflow: visible;
    width: 100%;
    max-height: none;
  }

  .footer-contact-right {
    width: 100%;
    justify-content: center;
  }

  .logo-icon,
  .logo-icon.fixed,
  .logo-icon.stopped {
    position: static;
    transform: none;
    margin: 0 auto;
  }

  .careers-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding: 50px 0px;
  }

  .financial-derivatives-header {
    background: black;
    text-align: center;
    padding: 30px 10px 28px;
    color: white;
  }

  .financial-derivatives-title {

    font-size: 1.9rem;
    font-weight: 400;
    color: white;
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .financial-derivatives-byline {

    font-size: 0.55rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: white;
    margin-bottom: 10px;
  }

  .financial-derivatives-hero-img {
    width: 100%;
    height: 500px;
    display: block;
    object-fit: cover;

  }

}

@media (min-width: 768px) and (max-width: 991.98px) {
  .footer-contact-left {
    width: 60%;
  }

  .footer-contact-right {
    width: 40%;
  }

  .logo-icon {
    width: 180px;
    height: 200px;
  }
}