html {
    background-color: white;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background-image: url(../Images/bg_squares.svg);
    margin: 0;
    padding: 0;
    color: #08bc7d;
}

#video-container {
    position: absolute; 
    top: 50px; 
    left: 0;
    right: 0;
    height: calc(100vh - 50px); 
    width: 100%;
    z-index: 0; 
    overflow: hidden;
}

#video-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 255, 0.7), rgba(0, 0, 255, 0.4), transparent);
    z-index: 1;
    pointer-events: none;
}

video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.text-overlay {
    position: absolute;
    bottom: -10vh; /* 5% from the bottom */
    left: 0vw;
    width: 100%;
    z-index: 1;
}

/* --------------------------------------Styles for the main content---------------------------------------------- */

.frontText {
    position: relative;
    font-family: 'Fira Sans', sans-serif;
    padding: 50px 20px;
    margin-top: 40vh;
    color: white; 
    opacity: 0;
    transform: translateX(-100px); 
    animation: slideInRight 1.5s ease forwards; 
    z-index: 2;
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.frontText h3 {
    max-width: 150px;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 
        3px 3px 5px rgba(0, 0, 0, 0.8), 
        0 0 10px rgba(0, 0, 255, 0.7), 
        1px 1px 0px rgba(255, 255, 255, 0.8); 
    position: relative; /* Ensure ::before is positioned relative to the h2 */
     
}

.frontText h4 {
    max-width: 625px;
    font-weight: 400;
    text-shadow: 
        2px 2px 6px rgba(0, 0, 0, 0.6), 
        0 0 8px rgba(0, 0, 255, 0.7); 
    position: relative; /* Ensure ::before is positioned relative to the h2 */
     
}

.downArrow {
    position: relative;
    left: 50%;
    bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateX(-50%);
    color: white; 
    z-index: 100;
    text-shadow: 
        2px 2px 10px rgba(0, 0, 0, 0.9), 
        0 0 15px rgba(0, 0, 255, 0.5); 
    animation: bounce 2s infinite;
    background-color: transparent;
    border-color: transparent;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

.frontText, .downArrow {
    font-size: 2.5cap;
}

/* Extra large screens (1440px and up) */
@media (min-width: 1440px) {
    .frontText {
        margin-top: 20vh; 
    }

    .downArrow {
        bottom: 80px; 
    }
}

/* Ultra-wide screens (1920px and up) */
@media (min-width: 1920px) {
    .frontText {
        margin-top: 10vh; 
    }

    .downArrow {
        bottom: 100px; 
    }
}

/* For screens 2560px and up */
@media (min-width: 2560px) {
    .frontText {
        margin-top: 5vh; 
    }

    .downArrow {
        bottom: 120px; 
    }

    .frontText h3, .frontText h4 {
        font-size: 3rem; 
    }

    .downArrow {
        font-size: 2.5rem; 
    }
}


/* --------------------------------------Styles for the second section---------------------------------------------- */

.secondText {
    max-width: 1050px;
    margin: 20px auto; 
    padding: 20px 40px;
    text-align: center;
    margin-top: 85vh;
    margin-bottom: 0%;
    font-family: 'Open Sans', sans-serif;
}


.secondText h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #3e2a75;
    text-transform: uppercase; /* Styling the header to stand out */
    font-weight: 400;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.secondText {
    color: #333;
    font-size: 1.5em;
    position: relative;
    overflow: hidden;
    padding: 0 20px;
}

.secondText button {
    background-color: transparent;
    color: #3e2a75;
    border-radius: 20px;
    border: 2px solid #3e2a75;
    margin-top: 3%;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.secondText button:hover, .secondText button:focus {
    background-color: #3e2a75;
    color: #fff;
    border-color: #3e2a75;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

@keyframes wiggle {
    0%, 7% {
        transform: rotateZ(0);
    }
    15% {
        transform: rotateZ(-15deg);
    }
    20% {
        transform: rotateZ(10deg);
    }
    25% {
        transform: rotateZ(-10deg);
    }
    30% {
        transform: rotateZ(6deg);
    }
    35% {
        transform: rotateZ(-4deg);
    }
    40%, 100% {
        transform: rotateZ(0);
    }
}

@media (min-width: 2560px) {
    .secondText {
        margin-top: 60%;
    }
}

.accreditations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    padding: 0 1.5rem;
  }
  
  .certifications-section h4 {
    text-align: center;
    font-size: 2rem;
    color: #3e2a75;
    text-transform: uppercase;
    font-weight: 400;
    padding-top: 0%;
    margin-bottom: 2rem;
    letter-spacing: 1px;
  }
  
  .accreditation-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    border-top: 4px solid #3e2a75;
    box-shadow: 0 6px 20px rgba(62, 42, 117, 0.08);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 220px;
  }
  
  .accreditation-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  }
  
  .accreditation-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 70px;
    height: 70px;
    background: url('/Images/bg_squares.svg');
    opacity: 0.04;
    pointer-events: none;
  }
  
  .accreditation-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    width: 100%;
  }
  
  .issuer-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 10px;
    flex-shrink: 0;
  }
  
  .accreditation-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
  }
  
  .accreditation-meta h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #3e2a75;
    margin: 0;
  }
  
  .accreditation-meta .validity {
    font-size: 0.75rem;
    color: #888;
  }
  
  .accreditation-description {
    font-size: 1.1rem; /* smaller size */
    color: #4a5568;
    text-align: left; /* align text to the right */
  }
  
  .cert-button {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
    background-color: #3e2a75;
    color: white;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
  }
  
  .cert-button:hover {
    background-color: #ff7c1a;
    transform: translateY(-2px);
  }


.services-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
    padding: 2rems;
    margin-top: 10px;
    background: #ffffff; /* Changed to pure white */
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    border: 1px solid #e2e8f0; /* Subtle border */
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #fff;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e0;
}

.service-item img {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    filter: invert(24%) sepia(89%) saturate(2158%) hue-rotate(216deg) brightness(93%) contrast(91%); /* Blue accent */
    transition: transform 0.3s ease;
}

.service-item:hover img {
    transform: scale(1.1);
}

.service-text h4 {
    color: #1a365d;
    font-size: 0.95rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700; /* Bolder weight */
    letter-spacing: -0.25px;
}

.service-text p {
    color: #4a5568;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
    opacity: 0.9;
}

@media (max-width: 1280px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem;
        padding: 2rem 7%;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 1.5rem 5%;
    }
    
    .service-item {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 1.5rem 7%;
    }
    
    .service-item {
        flex-direction: row;
        text-align: left;
        padding: 1.25rem;
        align-items: center;
    }
    
    .service-item img {
        margin-bottom: 0;
        margin-right: 1.25rem;
    }
    
    .service-text p {
        font-size: 0.875rem;
    }
}

/* Grid Style Certifications */
.certifications-section {
    padding: 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.certs-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    position: relative;
}

.cert-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(62, 42, 117, 0.08);
    transition: transform 0.3s ease;
    border-left: 6px solid #3e2a75;
    display: flex;
    flex-direction: column;
}

.cert-card:hover {
    transform: translateY(-5px);
}

.cert-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.issuer-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.cert-meta h3 {
    color: #3e2a75;
    margin: 0;
    font-size: 1.4rem;
}

.validity {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.cert-details {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    flex-grow: 1;
}

.cert-details li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cert-details li:last-child {
    border-bottom: none;
}

.cert-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    background: #3e2a75;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: auto;
    width: fit-content;
}

.cert-button:hover {
    background: #ff7c1a;
    transform: translateY(-2px);
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .certs-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .certs-container {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .cert-header {
        flex-direction: column;
        text-align: center;
    }
    
    .cert-button {
        width: 100%;
    }
}

/* --------------------------------------Styles for the third section---------------------------------------------- */
.thirdText {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    gap: 30px;
    max-width: 975px;
    margin: 20px auto;
    padding: 20px;
    font-family: Open Sans, sans-serif;
    grid-auto-rows: 1fr; /* Ensure consistent row height */
}

.OurFacility {
    text-align: center;
    font-size: 2.5rem; 
    font-weight: 700;
    letter-spacing: 1.5px; 
    color: #ff7c1a; 
    margin: 0 auto 20px; 
    padding: 0; 
    padding-top: 0%;
    padding-bottom: 0%;
}

.OurFacility h3{
    margin-bottom: 0%;
    text-align: center;
    font-size: 2.5rem;
    color: #3e2a75;
    text-transform: uppercase; /* Styling the header to stand out */
    font-weight: 400;
}

.janGrnd, .mechBuild, .repRenCon, .hoo-wii-r {
    position: relative;
    width: 100%;
    height: 350px;
    perspective: 1000px;
    border-radius: 15px;
    box-sizing: border-box;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease-in-out;
    transform-style: preserve-3d;
    border-radius: 15px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.janGrnd:hover .flip-card-inner,
.mechBuild:hover .flip-card-inner,
.repRenCon:hover .flip-card-inner,
.hoo-wii-r:hover .flip-card-inner {
    transform: rotateY(180deg);
    z-index: 1; /* Ensure flipped card is on top */
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
}

.flip-card-front {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flip-card-front img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    transition: transform 0.3s ease;
    object-fit: cover; /* Ensure the image covers the entire area */
}

.flip-card-front img:hover {
    transform: scale(1.05);
}

.flip-card-back {
    background-color: #3e2a75;
    color: white;
    transform: rotateY(180deg);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    z-index: 2; /* Ensure the back of the card is visible during the flip */
    overflow: hidden; /* Ensure content doesn't overflow the card */
    max-height: 100%;/* Handle long words or text */
}

.flip-card-back h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.flip-card-back p {
    font-size: 1rem;
    line-height: 1.5;
    max-width: 85%;
    word-wrap: break-word; /* Ensure text breaks to the next line */
    overflow-y: auto;
}

.flip-card-back a {
    margin-top: 20px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    border: 2px solid white;
    padding: 12px 25px;
    border-radius: 25px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.flip-card-back a:hover {
    background-color: white;
    color: #3e2a75;
}

.janGrnd .flip-card-back a {
    background-color: transparent;
    color: #fff; /* Match the card's color */
    border: 2px solid #fff;
}

.janGrnd .flip-card-back a:hover {
    background-color: white;
    color: #3e2a75; /* Make text white on hover */
}

.mechBuild .flip-card-back a {
    background-color: transparent;
    color: #fff; /* Match the card's color */
    border: 2px solid #fff;
}

.mechBuild .flip-card-back a:hover {
    background-color: white;
    color: darkgreen; /* Make text white on hover */
}

.repRenCon .flip-card-back a {
    background-color: transparent;
    color: #fff; /* Match the card's color */
    border: 2px solid #fff;
}

.repRenCon .flip-card-back a:hover {
    background-color: white;
    color: #ff7c1a; /* Make text white on hover */
}

.hoo-wii-r {
    position: relative;
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-sizing: border-box;
    border: 5px solid #3e2a75;
    overflow: hidden;
    background-color: #3e2a75;
}

.hoo-wii-r iframe {
    width: 100%;
    height: 350px;
    border: none;
    border-radius: 0 0 15px 15px;
    display: block;
}

/* Button now outside the video box */
.capButton {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 5px 0 45px 0;
    background: transparent;
}

.capButton a {
    text-decoration: none;
    background-color: transparent;
    color: #3e2a75;
    border-radius: 20px;
    border: 2px solid #3e2a75;
    font-weight: bold;
    padding: 12px 50px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.capButton a:hover {
    background-color: #3e2a75;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
/* Specific color for each card */
.janGrnd .flip-card-back {
    background-color: rgba(62, 42, 117, 0.85);
    border: 5px solid #3e2a75;
}

.janGrnd .flip-card-front {
    border: 5px solid #3e2a75;
    background-color: #a08dd6;
}

.mechBuild .flip-card-back {
    background-color: rgba(0, 100, 0, 0.85);
    border: 5px solid darkgreen;
}

.mechBuild .flip-card-front {
    border: 5px solid darkgreen;
    background-color: #08bc7d;
}

.repRenCon .flip-card-back {
    background-color: rgba(255, 124, 26, 0.85);
    border: 5px solid #ff7c1a;
}

.repRenCon .flip-card-front {
    border: 5px solid #ff7c1a;
    background-color: #ffa45f;
}

.hoo-wii-r .flip-card-front {
    border: 5px solid #3e2a75;
}

@media (max-width: 767px) {
    .thirdText {
        grid-template-columns: 1fr; /* Stack boxes vertically */
        gap: 20px; /* Reduce the gap between the boxes */
    }

    .janGrnd, .mechBuild, .repRenCon, .hoo-wii-r {
        height: 300px; /* Adjust height to fit better on smaller screens */
    }

    .flip-card-back h2 {
        font-size: 1.8rem;
    }

    .flip-card-back p {
        font-size: 0.9rem;
    }

    .flip-card-back a {
        padding: 10px 20px;
    }

    .capButton a {
        padding: 10px 40px; /* Adjust the button size */
    }

    .hoo-wii-r iframe {
        height: calc(100% - 50px); /* Adjust height to accommodate the button */
    }
}

/* For screens smaller than 768px */
@media (max-width: 768px) {
    .thirdText {
        gap: 15px;
    }

    .janGrnd, .mechBuild, .repRenCon, .hoo-wii-r {
        height: 280px;
    }

    .flip-card-back h2 {
        font-size: 1.5rem;
    }

    .flip-card-back p {
        font-size: 0.85rem;
    }

    .flip-card-back a {
        padding: 8px 18px;
    }

    .capButton a {
        padding: 8px 35px;
    }

    .hoo-wii-r iframe {
        height: calc(100% - 45px);
    }
}

/* For screens smaller than 480px */
@media (max-width: 480px) {
    .thirdText {
        gap: 10px;
        padding: 10px; /* Reduce padding */
    }

    .janGrnd, .mechBuild, .repRenCon, .hoo-wii-r {
        height: 250px;
    }

    .flip-card-back h2 {
        font-size: 1.3rem;
    }

    .flip-card-back p {
        font-size: 0.75rem;
    }

    .flip-card-back a {
        padding: 6px 15px;
    }

    .capButton a {
        padding: 6px 30px;
    }

    .hoo-wii-r iframe {
        height: calc(100% - 40px);
    }
}

/* ------------------------------------------Styles for the carousel section-------------------------------------- */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    font-family: Open Sans, sans-serif;
  }

.head1, .head2 {
    position: relative;
    text-align: center;
    width: 100%;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: black;
    margin: 0 auto 0px;
    padding: 0 0 0% 0;
    padding-top: 0%;
    z-index: -1;
}

.head1 h4, .head2 h4 {
    margin-bottom: 2%;
    margin-top: 1%;
    text-align: center;
    font-size: 2rem;
    color: #3e2a75;
     text-transform: uppercase; /* Styling the header to stand out */
    font-weight: 400;
}

.head1 {
    border-top: 6px solid #3e2a75; 
}

.head2 {
    border-top: 6px solid darkgreen; 
}

.logos1, .logos2 {
    white-space: nowrap;
    padding: 60px 0;
    padding-top: 0%;
    padding-bottom: 0%;
    position: relative;
}

.logos-slide {
    display: inline-block;
}

.logos-slide a {
    display: inline-block;
    transition: transform 0.3s;
    position: relative;
}

.logos-slide a:hover {
    transform: translateY(-5px); 
}

.logos-slide img {
    height: 115px;
    margin: 0 50px;
    padding: 12.5px 0;
    transition: transform 0.3s;
}

.logos2 {
    border-bottom: 6px solid #ff7c1a; 
}

.logo-description {
    display: none; 
    position: absolute;
    bottom: auto; 
    left: 50%; 
    transform: translateX(-50%);
    width: 220px;
    background-color: #f9f9f9;
    color: #333;
    text-align: center;
    text-wrap: wrap;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border: 1px solid #ccc;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    overflow: visible;
}

.logos-slide a:hover .logo-description {
    position: absolute;
    display: block; 
    opacity: 1; 
    visibility: visible;
    z-index: 1;
}

.logoCarousel {
    position: relative;
}

@media (min-width: 1440px){ .secondText { max-width: 1200px; } }
@media (min-width: 1920px){ .secondText { max-width: 1400px; } }
@media (min-width: 2560px){ .secondText { max-width: 1600px; } }
@media (min-width: 3440px){ .secondText { max-width: 1800px; } }

/* 2) Make the grid columns grow as space appears */
.services-grid{
  /* fix a tiny typo you had: 2rems -> 2rem */
  padding: 2rem;

  /* let columns auto-wrap and grow up to a comfy size */
  grid-template-columns: repeat(
    auto-fit,
    minmax(clamp(180px, 16vw, 260px), 1fr)
  );

  gap: clamp(1rem, 1.2vw, 2rem);
}

/* 3) Scale the card content (icon, title, copy) with the viewport */
.service-item{
  padding: clamp(1rem, 1.5vw, 2rem);
}

.service-item img{
  width: clamp(48px, 3vw, 72px);
  height: clamp(48px, 3vw, 72px);
}

.service-text h4{
  font-size: clamp(1rem, 0.9vw, 1.35rem);
}

.service-text p{
  font-size: clamp(0.9rem, 0.7vw, 1.05rem);
  line-height: 1.5;
}

/* Optional: bump the "Our Strategy" header + button on big screens */
.secondText h2{
  font-size: clamp(2rem, 1.6vw, 2.75rem);
}
.secondText button{
  padding: clamp(12px, 0.8vw, 16px) clamp(24px, 1.2vw, 32px);
  font-size: clamp(14px, 0.6vw, 18px);
}

/* --- SERVICES: prevent a single card on its own row --- */
@media (min-width: 1440px){
  .services-grid{
    grid-template-columns: repeat(6, 1fr) !important; /* 6 in one row */
  }
}

/* Desktop/mid: two even rows */
@media (min-width: 1024px) and (max-width: 1439px){
  .services-grid{
    grid-template-columns: repeat(3, 1fr) !important; /* 3 + 3 */
  }
}

/* (Your existing rules already handle <=1024px as 2 then 1 column) */@media (min-width: 1281px) and (max-width: 1919px){
  .services-grid{
    grid-template-columns: repeat(6, 1fr) !important; /* back to your original */
    gap: 1.5rem !important;
    padding: 2rem !important;
  }
  /* keep original card sizing */
  .service-item{ padding: 1.5rem !important; }
  .service-item img{ width: 48px !important; height: 48px !important; }
  .service-text h4{ font-size: 0.95rem !important; }
  .service-text p{ font-size: 0.85rem !important; }
}

/* Large monitors: roomier cards, still 6 in one row (no widows) */
@media (min-width: 1920px){
  .secondText{ max-width: 1400px; }
  .services-grid{
    grid-template-columns: repeat(6, 1fr) !important; /* 6 across, single row */
    gap: 2rem;
  }
  .service-item{ padding: 2rem; }
  .service-item img{ width: 64px; height: 64px; }
  .service-text h4{ font-size: 1.15rem; }
  .service-text p{ font-size: 1rem; }
}

/* Ultra-wide */
@media (min-width: 2560px){
  .secondText{ max-width: 1600px; }
  .service-item{ padding: 2.25rem; }
  .service-item img{ width: 72px; height: 72px; }
  .service-text h4{ font-size: 1.25rem; }
  .service-text p{ font-size: 1.05rem; }
}

/* tighten space between hero and the services row */
.secondText{
  margin-top: calc(100svh - 100px + 12px);   /* was + 48px */
}

/* ===================== ACCREDITATIONS (grid + cards) ===================== */
/* Grid scales but stays 3-up for your three cards */
.accreditations-grid{
  gap: clamp(1rem, 1.2vw, 2rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Card size + content scale with viewport */
.accreditation-card{
  padding: clamp(1.25rem, 1.4vw, 2.25rem);
  min-height: clamp(220px, 20vh, 280px);
}

.issuer-logo{
  width: clamp(50px, 3vw, 80px);
  height: clamp(50px, 3vw, 80px);
}

.accreditation-meta h3{
  font-size: clamp(1.1rem, 0.8vw, 1.5rem);
}

.accreditation-meta .validity{
  font-size: clamp(0.75rem, 0.45vw, 0.95rem);
}

.accreditation-description{
  font-size: clamp(1rem, 0.7vw, 1.2rem);
}

.cert-button{
  font-size: clamp(0.85rem, 0.55vw, 1rem);
  padding: clamp(0.65rem, 0.6vw, 0.9rem) clamp(1.2rem, 1.2vw, 1.6rem);
}

/* Widen the whole certifications section on big screens */
@media (min-width: 1920px){ .certifications-section { max-width: 1600px; } }
@media (min-width: 2560px){ .certifications-section { max-width: 1800px; } }

/* ===== FACILITY SERVICES: scale on large/ultra-wide screens only ===== */

/* Make the section itself wider as the screen grows */
@media (min-width: 1440px){ .thirdText { max-width: 1200px; gap: 36px; } }
@media (min-width: 1920px){ .thirdText { max-width: 1400px; gap: 40px; } }
@media (min-width: 2560px){ .thirdText { max-width: 1600px; gap: 44px; } }
@media (min-width: 3440px){ .thirdText { max-width: 1800px; gap: 48px; } }

/* Grow each card’s height smoothly (keeps two-column layout) */
@media (min-width: 1440px){
  .janGrnd, .mechBuild, .repRenCon, .hoo-wii-r{
    height: clamp(380px, 22vw, 460px);
  }
}
@media (min-width: 1920px){
  .janGrnd, .mechBuild, .repRenCon, .hoo-wii-r{
    height: clamp(420px, 24vw, 520px);
  }
}
@media (min-width: 2560px){
  .janGrnd, .mechBuild, .repRenCon, .hoo-wii-r{
    height: clamp(520px, 26vw, 640px);
  }
}

/* Make the flip-card content scale with screen size */
@media (min-width: 1440px){
  .flip-card-back h2{
    font-size: clamp(2rem, 1.2vw + 1rem, 2.6rem);
  }
  .flip-card-back p{
    font-size: clamp(1rem, 0.6vw + 0.6rem, 1.2rem);
  }
  .flip-card-back a{
    padding: clamp(12px, 0.6vw, 16px) clamp(24px, 1.2vw, 32px);
  }
}

/* Video tile: let the iframe fill the growing box */
@media (min-width: 1440px){
  .hoo-wii-r { overflow: hidden; }
  .hoo-wii-r iframe{
    width: 100%;
    height: 100%;          /* was a fixed 350px */
    display: block;
    border-radius: 0 0 15px 15px;
  }
}

/* Section headline scales a touch on big screens */
@media (min-width: 1440px){
  .OurFacility h3{
    font-size: clamp(2.5rem, 1.2vw + 1.8rem, 3rem);
  }
}

/* Large desktops */
@media (min-width: 1440px){
  .thirdText .flip-card-back h2{ font-size: 2.25rem !important; }
  .thirdText .flip-card-back p { font-size: 1.05rem !important; }
  .thirdText .flip-card-back a { font-size: 1.00rem !important; } /* "More" */
  .capButton a { font-size: 1.10rem !important; }
}

/* 1920px+ */
@media (min-width: 1920px){
  .thirdText .flip-card-back h2{ font-size: 2.50rem !important; }
  .thirdText .flip-card-back p { font-size: 1.15rem !important; }
  .thirdText .flip-card-back a { font-size: 1.05rem !important; }
  .capButton a { font-size: 1.20rem !important; }
}

/* 2560px+ */
@media (min-width: 2560px){
  .thirdText .flip-card-back h2{ font-size: 2.80rem !important; }
  .thirdText .flip-card-back p { font-size: 1.25rem !important; }
  .thirdText .flip-card-back a { font-size: 1.15rem !important; }
  .capButton a { font-size: 1.35rem !important; }
}

/* -------- Capability Statement button: scale on big screens -------- */
@media (min-width: 1440px){
  .capButton a{
    font-size: clamp(1rem, 0.8vw, 1.35rem);
    padding: clamp(12px, 0.7vw, 16px) clamp(44px, 1.6vw, 68px);
    border-radius: 9999px;
  }
}

@media (min-width: 2560px){
  .capButton a{
    font-size: 1.5rem;                 /* if you want a touch more at 2560+ */
    padding: 16px 78px;
  }
}

@media (min-width: 1440px){
  .text-overlay{ bottom: -1.25vh; }
  .downArrow{ bottom: 33px; }
}
@media (min-width: 1920px){
  .text-overlay{ bottom: -1.75vh; }
  .downArrow{ bottom: 35px; }
}
@media (min-width: 2560px){
  .text-overlay{ bottom: -2.25vh; }
  .downArrow{ bottom: 37px; }
}
@media (min-width: 3440px){
  .text-overlay{ bottom: -2.75vh; }
  .downArrow{ bottom: 39px; }
}