:root {
    --dark: #1d1d1f;
    --paragraph: rgba(29, 29, 31, 0.7);
    --font_inter_tight: "Inter Tight", sans-serif;
    --font_teko: "Teko", sans-serif;
}


@media (max-width: 1439px) {
    .popup-menu ul li a {
        font-size: 70px; /* Reduced font size */
        line-height: 70px; 
        padding: 20px 0; /* Add padding for better touch */
        height: 70px;
    }
    .popup-menu ul li a:hover span:nth-child(2) {
        margin-top: -80px;
    }
    .hero-sec .hero-sec-content h1 {
        font-size: 90px;
        letter-spacing: -4px;
        line-height: 70px; padding: 20px 0; /* Add padding for better touch */
    }
    .hero-sec .hero-sec-content h1 span {
        line-height: 70px; padding: 20px 0; /* Add padding for better touch */
    }
    .video-sec {
        padding: 0 20px;
        height: auto;
        min-height: 100%;
        position: relative;
    }
    .video-sec video {
        border-radius: 20px;
        display: block;
        height: 100%;
        object-fit: cover;
    }
    .featured-work-sec .section-header {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .featured-work-sec  .section-header .right {
        display: none;
    }
    .featured-card .img-box {
        height: 240px;
    }
    .about-bottom-content-wrap .img-box {
        aspect-ratio: unset;
        height: 969px;
        max-width: 638px;
    }
    .about-bottom-content-wrap .about-bottom-content {
        padding-top: 200px;
    }
    .about-bottom-content-wrap .about-bottom-content p {
        max-width: 100%;
    }
    .about-bottom-content-wrap .about-bottom-content h4 br {
        display: none;
    }
    .intro-sec {
        padding: 50px 15px;
    }
    .intro-title {
        font-size: 45px;
    }
    .intro-subtitle {
        font-size: 30px;
    }
    .values-list li {
        font-size: 18px;
    }
    .vision-mission {
        font-size: 20px;
    }
    .experience-lists2,
    .experience-lists {
        grid-template-columns: repeat(1, 1fr);
    }
    .trade-association-sec .custom-row, 
    .experience2-sec .custom-row,
    .motivation-sec .custom-row {
        gap: 74px;
    }
    .experience2-sec .right {
        flex: 1;
    }
    .trade-association-lists,
    .experience2-sec .experience2-lists {
        width: 100%;
    }
    .experience2-box .experience2-box-body p,
    .motivation-sec .motivation-content {
        max-width: 100%;
    }
    .trade-association-sec .left h3, 
    .experience2-sec .left h3, 
    .motivation-sec .left h3 {
        font-size: 30px;
        letter-spacing: -0.8px;
        line-height: 30px;
    }
    .full-image-sec {
        padding-left: 20px;
        padding-right: 20px;
    }
    .full-image-sec .full-image-box {
        border-radius: 20px;
    }
    .cta-sec {
        padding-bottom: 40px;
    }
    .footer-area .footer-big-text {
        font-size: 116px;
        letter-spacing: -3.2px;
        line-height: 110px;
    }
    .footer-area {
        padding-top: 30px;
    }
    .hero-sec2 .hero-sec-content {
        gap: 16px;
        margin-bottom: auto;
    }
    .services-sec {
        padding: 110px 0 0;
    }
    .services-sec .tab-content {
        width: 100%;
        padding-left: 40px;
        padding-right: 40px;
    }
    .services-list-wrap {
        grid-template-columns: repeat(1, 1fr);
    }
    .contact-sec {
        flex-direction: column;
        height: auto;
    }
    .contact-sec .contact-form-wrap {
        width: 100%;
    }
    .contact-sec .contact-img {
        width: 100%;
    }
    .contact-infos-wrap {
        padding-left: 40px;
        padding-right: 40px;
    }
    .project-detail2-content-box,
    .project-detail-header-infos,
    .contact-info-box ul li {
        flex-direction: column;
        align-items: flex-start;
    }
    .project-detail-header-infos  {
        gap: 74px;
    }
    .project-detail-header-infos .project-detail-header-left p {
        max-width: 100%;
    }
    .project-detail-header-infos .project-detail-header-right {
        width: 100%;
    }
    .project-detail2-content-box {
        gap: 24px;
    }
    .project-detail2-content-box p {
        color: #fff;
        width: 100%;
    }
    .project-detail2-content-box h4 {
        font-size: 30px;
        line-height: 30px;
        letter-spacing: 0;
        color: #ce1626;
    }
    .project-detail2-content-wrap {
        padding-top: 70px;
    }
    .project-detail-text-anim-wrap {
        padding-bottom: 0;
    }
}


/* Full-size images and scroll positioning on larger screens */
@media (min-width: 1200px) {
    .hero-footer-wrap .hero-footer-right .hero-sec-scroll-image {
        width: 200px; /* Increase size on larger screens */
        margin-right: 15px; /* Increase spacing */
    }
    .hero-sec .hero-footer-wrap .hero-footer-right a,
    .hero-sec .hero-footer-wrap p {
        font-size: 22px;
    }
    .project-detail2-content-box h4 {
        font-size: 50px;
        line-height: 50px;
    }
}


/* Responsive Adjustments for Team Section */
@media screen and (max-width: 1024px) {
    /* On tablets and smaller screens, center the section title */
    .team-sec .section-title {
        font-size: 30px; /* Reduce title size */
    }

    /* Adjust team card layout for smaller screens */
    .team-cards-wrap {
        flex-direction: column; /* Stack cards vertically */
        align-items: center;
        gap: 20px; /* Reduce gap between cards */
    }

    .team-card {
        width: 80%; /* Reduce card width for better fit */
    }

    .team-member-name {
        font-size: 20px;
    }

    .team-member-role {
        font-size: 14px;
    }

    .team-member-bio {
        font-size: 13px;
    }
}


/* Intermediate Screens */
@media (max-width: 809px) {
    main.a1ltd-main {
        position: relative;
        overflow: initial;
    }
    .popup-menu ul li a {
        font-size: 40px;
        letter-spacing: -1.3px;
        line-height: 30px;
        height: 40px;
    }
    .popup-menu ul li a:hover span:nth-child(2) {
        margin-top: -40px;
    }
    .popup-menu-wrap .popup-menu-header {
        justify-content: center;
    }
    .header-wrap {
        padding: 36px 25px;
    }
    .header-wrap .header-middle,
    .header-wrap .header-right {
        flex: none;
        width: auto;
    }
    .header-wrap .header-logo-box {
        width: 100px;
    }
    .header-wrap .theme-btn {
        font-size: 12px;
        line-height: 16px;
        letter-spacing: 0px;
        padding: 10px 12px;
    }
    .hero-sec .hero-sec-content h1 {
        font-size: 50px;
        letter-spacing: -2px;
        line-height: 40px;
    }
    .hero-sec .hero-sec-content h1 span {
        line-height: 40px;
    }
    .hero-sec .hero-sec-content {
        gap: 16px;
        margin-bottom: auto;
    }
    .hero-sec {
        height: auto;
        min-height: 100%;
        gap: 100px;
    }
    .hero-sec .hero-footer-wrap p {
        display: none; 
    }
    .hero-sec .hero-footer-wrap .hero-footer-right {
        display: flex; /* Show hero-footer-right */
        flex-direction: column; /* Align items vertically */
        align-items: center; /* Center align content */
        text-align: center;
        width: 100%; /* Make sure it takes the full width */
    }
    .hero-sec .hero-footer-wrap .hero-footer-right a.link-with-line {
        font-size: 28px; /* Adjust font size */
        color: #ce1626; /* Apply a consistent color */
    }
    .video-sec {
        height: 551px;
        margin-bottom: 30px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .section-header {
        padding: 60px 40px 0;
    }
    .section-header h3 {
        font-size: 40px;
        letter-spacing: -1.3px;
        line-height: 30px;
    }
    .section-header h3 span {
        line-height: 30px;
    }
    .featured-work-sec {
        margin-bottom: 30px;
    }
    .featured-work-lists {
        grid-template-columns: repeat(1, 1fr);
    }
    .featured-card .img-box {
        height: 163px;
    }
    .section-header2 .title {
        font-size: 40px;
        letter-spacing: -1.3px;
        line-height: 30px;
        gap: 16px;
    }
    .section-header2 .title span {
        line-height: 30px;
    }
    .about-sec .section-header2 {
        height: min-content;
        padding: 80px 0;
        position: relative;
    }
    .about-bottom-content-wrap .about-bottom-content {
        padding: 70px 25px 60px;
    }
    .about-bottom-content-wrap .about-bottom-content h4 {
        font-size: 24px;
        line-height: 28px;
    }
    .experience-box .experience-button-box,
    .about-bottom-content-wrap .about-bottom-content p {
        display: none;
    }
    .about-bottom-content-wrap .about-bottom-content .responsive-mode,
    .about-bottom-content-wrap .about-bottom-content h4 br {
        display: block;
    }
    .intro-sec {
        padding: 40px 10px;
    }
    .intro-title {
        font-size: 38px;
    }
    .intro-subtitle {
        font-size: 26px;
    }
    .values-list li {
        font-size: 16px;
    }
    .vision-mission {
        font-size: 18px;
    }
    .trade-association-sec .custom-row, .experience2-sec .custom-row, .motivation-sec .custom-row {
        flex-direction: column;
        gap: 60px;
    }
    .trade-association-sec .left h3, .experience2-sec .left h3, .motivation-sec .left h3 {
        font-size: 40px;
        letter-spacing: -0.8px;
        line-height: 40px;
    }
    .experience-sec {
        padding: 30px 20px 0;
        gap: 50px;
    }
    .motivation-sec {
        padding: 110px 30px 100px;
    }
    .full-image-box {
        height: 548px;
    }
    .full-image-sec {
        padding: 80px 15px 0;
    }
    .experience2-sec {
        padding: 90px 30px 0;
    }
    .trade-association-box .content .content-body h4,
    .experience2-box .experience2-box-body h4 {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .trade-association-sec {
        padding: 70px 20px 0;
    }
    .trade-association-box {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }
    .trade-association-box .trade-association-box-left {
        width: 100%;
    }
    .trade-association-box .content {
        gap: 24px;
        padding: 25px;
    }
    .section-header3 .title {
        font-size: 40px;
        line-height: 30px;
        gap: 12px;
        letter-spacing: -0.8px;
    }
    .faq-wrap {
        padding: 0 20px;
    }
    .section-header3 {
        margin-bottom: 50px;
    }
    .cta-sec .section-header2 .title span {
        line-height: 45px;
    }
    .cta-sec {
        padding: 50px 20px 20px;
    }
    .cta-sec .about-bottom-content-wrap .about-bottom-content p {
        display: block;
    }
    .cta-sec .section-header2 .title {
        font-size: 50px;
        line-height: 45px;
        letter-spacing: -1.3px;
    }
    .cta-sec .about-bottom-content-wrap .about-bottom-content p br:nth-child(1) {
        display: none;
    }
    .social-links {
        flex-direction: column;
        gap: 20px;
    }
    .footer-area .footer-big-text {
        font-size: 50px;
        line-height: 53px;
        letter-spacing: -1.2px;
    }
    .copyright {
        flex-direction: column;
        gap: 20px;
        padding: 30px 40px 56px;
    }
    .projects-page .featured-work-lists {
        padding: 0 20px;

    }
    .projects-page .footer-area {
        padding-top: 50px;
    }
    .photography-col.photography-col2 {
        grid-template-columns: repeat(1, 1fr);
    }
    .photography-inner-col,
    .photography-col.photography-col2 {
        height: auto;
    }
    .photography-col.photography-col2 .photography-box {
        height: auto;
    }
    .photography-sec {
        padding: 40px 20px 0;
    }
    .services-sec {
        padding-top: 80px;
    }
    .services-sec .tab-content {
        padding-left: 20px;
        padding-right: 20px;
    }
    .services-sec .services-nav {
        flex-wrap: nowrap;
    }
    .services-sec .services-nav li .nav-link {
        white-space: nowrap;
    }
    .services-box .services-box-bottom .theme-btn span {
        display: none;
    }
    .contact-infos-wrap .contact-infos {
        grid-template-columns: repeat(1, 1fr);
        gap: 60px;
    }
    .hero-sec3 {
        height: auto;
    }
    .contact-sec {
        padding: 60px 20px 40px;
    }
    .contact-sec .contact-form-wrap .contact-header h2 {
        font-size: 40px;
        line-height: 44px;
    }
    .contact-infos-wrap {
        padding: 20px;
    }
    .contact-infos-wrap .contact-infos {
        padding-top: 40px;
        padding-bottom: 40px;
    }
    .project-detail-text-anim-wrap ul li {
        font-size: 50px;
        line-height: 40px;
        letter-spacing: -2.3px;
        animation: workdetailsAnim2 30s infinite linear;
    }
    .project-detail2-content-wrap {
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 0;
    }
    .project-detail2-content-box {
        margin-bottom: 50px;
        padding-bottom: 50px;
    }
    .project-detail-full-img-wrap {
        padding: 20px 15px 15px; /* Reduce padding on smaller screens */
    }
    .project-detail-full-img {
        border-radius: 10px; /* Add rounded corners */
        overflow: hidden; /* Ensure no overflow */
    }
    .project-detail-full-img img {
        object-fit: cover; /* Contain images within the div */
        border-radius: 10px; /* Add rounded corners to images */
    }
    .project-detail2-content-wrap.project-detail2-content-wrap2,
    .project-detail-header-infos {
        padding-left: 20px;
        padding-right: 20px;
    }
    .privacy-sec .section-header h3,
    .support-sec .section-header h3 {
        font-size: 40px; 
        line-height: 50px;
    }
    .privacy-sec .section-header p,
    .support-sec .section-header p {
        font-size: 20px;
        line-height: 32px;
    }
}


/* Smaller screens */
@media (max-width: 768px) {
    h1, h2, h3, h4, h5, h6 {
        font-size: 80%; /* Reduce heading sizes for smaller screens */
    }
    .theme-btn {
        padding: 15px 30px; /* Increase padding for touch targets */
    }
    .navigation-item {
        margin: 10px 0; /* Increase spacing between navigation items */
    }
    .content-section {
        padding: 20px; /* Ensure padding for content sections on small screens */
    }
    .hero-sec .hero-sec-content .hero-sec-logo img {
        max-width: 60vw;  /* smaller logo */
        max-height: 40vh; 
        top: auto;        /* remove forced positioning */
    }
    #magic-cursor {
        display: none; /* Hide the magic cursor */
    }
    .hero-sec {
        height: auto;
        min-height: 100%;
    }
    .about-page .intro-sec h2 {
        font-size: 35px; /* Scale down for smaller screens */
    }

    .about-page .intro-sec p {
        font-size: 18px;
    }
    .about-page .hero-sec-about .hero-sec-content h1 {
        font-size: 60px; /* Smaller font size for mobile */
    }

    .about-page .hero-sec-about .hero-sec-content .hero-subtitle {
        font-size: 18px;
    }

    .about-page .hero-sec-about .hero-sec-content .theme-btn {
        font-size: 18px;
        padding: 10px 20px;
    }
    /* Further reduce title size on small tablets and larger phones */
    .team-sec .section-title {
        font-size: 28px;
        margin-bottom: 30px; /* Reduce bottom margin */
    }

    .team-card {
        width: 90%; /* Increase width to occupy more space */
        padding: 15px; /* Reduce padding */
    }

    .team-member-name {
        font-size: 18px; /* Reduce font size */
    }

    .team-member-role {
        font-size: 13px;
    }

    .team-member-bio {
        font-size: 12px;
    }


    /* Adjust the red status text */
    .hero-sec2 .hero-sec-content .red-status {
        font-size: 12px;        /* Smaller text on mobile */
        letter-spacing: 1px;    /* Slightly reduced letter spacing */
    }

    /* Adjust the H1 title for mobile responsiveness */
    .hero-sec2 .hero-sec-content h1 {
        font-size: clamp(24px, 5vw, 48px);   /* Responsive scaling for mobile */
        line-height: 1.2;
        margin: 0.3em 0;
        display: flex;
        flex-direction: column;
        gap: 0.2em;
    }
    .hero-sec2 .hero-sec-content h1 span {
        display: block;        /* Stack the elements vertically */
    }
}


/* ---------- 1) Mobile baseline sizing (≤585px) ---------- */
@media (max-width: 585px) {
  .popup-menu ul { gap: 10px; }

  .popup-menu ul li a {
    position: relative;         /* for .count */
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    font-size: 26px;
    line-height: 1.15;
    height: auto;
    overflow: visible;
  }

  .popup-menu ul li a .count {
    position: absolute;
    top: -6px;
    left: -10px;
  }

  .popup-menu ul li a span {            /* visible label */
    display: inline-block;
    font-size: 22px;
  }

  /* Header/logo tweaks */
  .popup-menu-wrap .popup-menu-header { 
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .popup-menu-wrap .popup-menu-header .header-logo-box {
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto; padding: 10px 15px; width: 100px;
    text-transform: uppercase; font-weight: 600; font-size: 16px;
    color: rgba(255,255,255,.7);
  }
  .popup-menu-wrap .popup-menu-close-btn .icon { width: 30px; height: 30px; }

  /* Spacing */
  .popup-menu ul li { margin-bottom: 10px; }

  /* Other section tweaks */
  .contact-sec .contact-img,
  .cta-content.about-bottom-content-wrap .img-box { height: 516px; }
  .intro-sec { padding: 30px 5px; }
  .intro-title { font-size: 32px; }
  .intro-subtitle { font-size: 24px; }
  .values-list li { font-size: 14px; }
  .vision-mission { font-size: 16px; }
  .project-detail-full-img-wrap { padding: 10px; }
  .project-detail-full-img,
  .project-detail-full-img img { border-radius: 8px; }
  .team-sec .section-title { font-size: 24px; margin-bottom: 20px; }
  .team-card { width: 95%; padding: 10px; box-shadow: none; }
  .team-member-name { font-size: 16px; }
  .team-member-role { font-size: 12px; }
  .team-member-bio { font-size: 11px; }
}

/* ---------- 2) Touch devices: disable the hover swap (prevents doubles) ---------- */
/* Applies to phones/tablets in both portrait & landscape */
@media (hover: none), (pointer: coarse) {
  .popup-menu ul li a span[aria-hidden="true"] { display: none !important; }
  .popup-menu ul li a:hover span:nth-child(2) { margin-top: 0 !important; }
}

/* ---------- 3) Very short screens in landscape: enforce single label ---------- */
@media (max-height: 580px) and (orientation: landscape) {
  .popup-menu ul li a {
    height: auto !important;
    overflow: visible !important;
  }
  .popup-menu ul li a span[aria-hidden="true"] { display: none !important; }
  .popup-menu ul li a:hover span:nth-child(2) { margin-top: 0 !important; }
}

/* ---------- 4) Tall portrait phones: restore the swap cleanly ---------- */
/* Only when there's room: portrait, ≥700px tall, and narrow */
/* @media (orientation: portrait) and (min-height: 700px) and (max-width: 585px) and (hover: hover) and (pointer: fine) {
  .popup-menu ul { gap: 14px; }

  .popup-menu ul li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 36px;
    height: 36px;           /* fixed row height for perfect clipping /
    overflow: hidden;       /* clip the stacked spans /
    font-size: 30px;
  }

  .popup-menu ul li a span[aria-hidden="true"] { display: inline !important; }
  .popup-menu ul li a:hover span:nth-child(2) { margin-top: -36px !important; }
  .popup-menu ul li a span { font-size: 28px; }
} */


@media (max-height: 400px) {
    .hero-footer-wrap .hero-footer-right .hero-sec-scroll-image {
        display: none;
    }
    .hero-sec .hero-footer-wrap .hero-footer-right a,
    .hero-sec .hero-footer-wrap p {
        display: none;
    }
    .hero-sec .hero-sec-content .hero-sec-logo img {
        width: 55%;
    }
    .section-header2 .title {
        font-size: clamp(24px, 5vw, 32px);
        line-height: 1.1;
        letter-spacing: -0.8px;
        gap: 8px;
    }

    .section-header2 .title span {
        line-height: 1.1;
    }

    /* Make sure the menu itself isn't clipping */
    .popup-menu-wrap .popup-menu { overflow: visible !important; }

    /* One label only on very narrow screens */
    .popup-menu-wrap .popup-menu nav ul li a {
        position: relative !important;
        display: inline-block !important;
        white-space: nowrap !important;
        overflow: visible !important;
        height: auto !important;
        line-height: 1.2 !important;
        text-align: center !important;

        /* Fluid, smaller type that still scales up on bigger phones */
        font-size: clamp(18px, 6vw, 24px) !important;
        letter-spacing: 0.02em !important; /* reduce big theme spacing */
    }

    /* Hide the duplicate animation span (prevents doubles) */
    .popup-menu-wrap .popup-menu nav ul li a span[aria-hidden="true"] {
        display: none !important;
    }

    /* Kill the swap offset so nothing slides/clips */
    .popup-menu-wrap .popup-menu nav ul li a:hover span:nth-child(2) {
        margin-top: 0 !important;
        transform: none !important;
    }

    /* Inner span scales with the link */
    .popup-menu-wrap .popup-menu nav ul li a span {
        display: inline-block !important;
        font-size: 1em !important; /* inherit from link's clamp() */
        transition: none !important;
        transform: none !important;
    }

    /* Count badge stays tidy */
    .popup-menu-wrap .popup-menu nav ul li a .count {
        position: relative !important;
        top: -0.25em; margin-right: 0.35em; font-size: 0.7em;
    }

    /* Slightly tighter list spacing on tiny widths */
    .popup-menu-wrap .popup-menu nav ul { gap: 8px !important; }
    .popup-menu-wrap .popup-menu nav ul li { margin-bottom: 8px !important; }
}
/* Ultra-narrow safety (old SE/mini) */
@media (max-width: 320px) {
    .popup-menu-wrap .popup-menu nav ul li a {
        font-size: clamp(16px, 6.5vw, 20px) !important;
        letter-spacing: 0.01em !important;
    }
}
/* ===== PORTRAIT PHONES (≤585px): force single label, no swap ===== */
@media (orientation: portrait) and (max-width: 585px) {
  /* Allow vertical scroll while preventing clip */
  .popup-menu-wrap .popup-menu {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: 100svh;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* link row: compact and balanced */
  .popup-menu-wrap .popup-menu nav ul li a {
    position: relative !important;
    display: inline-block !important;
    white-space: nowrap !important;
    text-align: center !important;
    height: auto !important;
    line-height: 1.1 !important;
    overflow: visible !important;

    /* slightly smaller font to fit all items comfortably */
    font-size: clamp(18px, 5.5vw, 24px) !important;
    letter-spacing: 0.015em !important;
  }

  /* Hide animation duplicates */
  .popup-menu-wrap .popup-menu nav ul li a span[aria-hidden="true"] {
    display: none !important;
  }

  /* Disable hover animation offsets */
  .popup-menu-wrap .popup-menu nav ul li a:hover span:nth-child(2) {
    margin-top: 0 !important;
    transform: none !important;
  }

  /* Clean span styling */
  .popup-menu-wrap .popup-menu nav ul li a span {
    display: inline-block !important;
    font-size: 1em !important;
    transition: none !important;
    transform: none !important;
  }

  /* Hide the count numbers (1), (2), etc. */
  .popup-menu-wrap .popup-menu nav ul li a .count {
    display: none !important;
  }

  /* Tighter spacing between items */
  .popup-menu-wrap .popup-menu nav ul {
    gap: 4px !important;
  }
  .popup-menu-wrap .popup-menu nav ul li {
    margin-bottom: 4px !important;
  }
}
/* ===== LANDSCAPE PHONES (short screens ≤580px): horizontal row ===== */
@media (orientation: landscape) and (max-height: 580px) {
  /* container – nothing here should force a column */
  .popup-menu-wrap .popup-menu {
    overflow: visible !important;
    padding: env(safe-area-inset-top) 12px env(safe-area-inset-bottom);
    display: block !important; /* avoid container-level flex column rules */
  }

  /* the list itself must be a horizontal flex row */
  .popup-menu ul,
  .popup-menu nav ul {
    display: flex !important;
    flex-wrap: wrap !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px 16px !important;   /* row/column spacing */
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  /* kill mobile column defaults that force full-width items */
  .popup-menu ul li,
  .popup-menu nav ul li {
    display: inline-flex !important;
    width: auto !important;
    margin: 0 !important;
  }

  /* horizontal chip-style links (single label; no swap) */
  .popup-menu ul li a,
  .popup-menu nav ul li a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 14px !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    border-radius: 9999px !important;
    white-space: nowrap !important;
    height: auto !important;
    line-height: 1.05 !important;
    font-size: clamp(14px, 2.2vw, 18px) !important;
    letter-spacing: 0.01em !important;
    overflow: visible !important;
    width: auto !important;       /* ensure anchors don’t stretch full width */
  }

  /* disable the 2-span hover swap on landscape touch */
  .popup-menu ul li a span[aria-hidden="true"],
  .popup-menu nav ul li a span[aria-hidden="true"] {
    display: none !important;
  }
  .popup-menu ul li a:hover span:nth-child(2),
  .popup-menu nav ul li a:hover span:nth-child(2) {
    margin-top: 0 !important;
    transform: none !important;
  }
  .popup-menu ul li a span,
  .popup-menu nav ul li a span {
    display: inline-block !important;
    font-size: 1em !important;
    transition: none !important;
    transform: none !important;
  }

  /* hide count badges for a clean row */
  .popup-menu ul li a .count,
  .popup-menu nav ul li a .count {
    display: none !important;
  }
}





/* ===== Short / wide phones: keep team cards compact and multi-column ===== */
@media (orientation: landscape) and (max-height: 560px) {
  .team-sec {
    padding: 48px 14px;
    border-radius: 16px;
  }

  .team-sec .container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .team-cards-wrap {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 16px !important;
  }

  .team-card {
    width: min(260px, calc(33.333% - 12px)) !important;
    min-width: 200px;
    max-width: 100%;
    padding: 14px !important;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  }

  .team-member-img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: center top;
    border-radius: 10px;
  }

  .team-member-info {
    margin-top: 12px;
  }

  .team-member-name {
    font-size: 18px;
  }

  .team-member-role {
    font-size: 12px;
  }

  .team-member-bio {
    font-size: 11px;
    line-height: 1.45;
  }

  .experience-popup {
    align-items: flex-start;
    padding: 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .experience-popup .experience-popup-content-wrap {
    width: min(100%, 920px);
    max-height: calc(100dvh - 24px);
    overflow: auto;
    padding: 48px 18px 18px;
    gap: 18px;
    align-items: flex-start;
  }

  .experience-popup .experience-popup-content-wrap .close-experience-popup-btn {
    top: 14px;
    right: 14px;
  }

  .experience-popup .experience-popup-content-wrap .experience-popup-content {
    flex: 1 1 0;
    min-width: 0;
    gap: 12px;
  }

  .experience-popup .experience-popup-content-wrap .experience-popup-content p {
    font-size: 15px;
    line-height: 1.45;
    letter-spacing: 0.3px;
  }

  .experience-popup .experience-popup-content-wrap .experience-popup-content .experience-popup-header .detail {
    padding: 10px 16px;
    font-size: 12px;
  }

  .experience-popup .experience-popup-content-wrap .experience-popup-content .experience-popup-header h3 {
    font-size: 24px;
    line-height: 1;
    margin-top: 18px;
    padding-bottom: 12px;
  }

  .experience-popup .experience-popup-content-wrap .experience-popup-features {
    padding: 4px 0;
  }

  .experience-popup .experience-popup-content-wrap .experience-popup-features h4 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .experience-popup .experience-popup-content-wrap .experience-popup-features .experience-popup-feature-lists {
    gap: 12px;
  }

  .experience-popup .experience-popup-content-wrap .experience-popup-features .experience-popup-feature {
    font-size: 15px;
    line-height: 1.35;
  }

  .experience-popup .experience-popup-content-wrap .experience-popup-btns {
    gap: 10px;
  }

  .experience-popup .experience-popup-content-wrap .experience-popup-btns a {
    font-size: 13px;
    line-height: 1.15;
    padding: 10px 12px;
  }

  .experience-popup .experience-popup-content-wrap .experience-popup-img {
    width: min(42vw, 280px);
    height: min(44vh, 220px);
  }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 760px) {
  .team-card {
    width: calc(50% - 8px) !important;
    min-width: 0;
  }

  .experience-popup .experience-popup-content-wrap {
    flex-direction: column-reverse;
  }

  .experience-popup .experience-popup-content-wrap .experience-popup-img {
    width: 100%;
    height: min(36vh, 180px);
  }
}

@keyframes workdetailsAnim2 {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-1343px);
    }
}


