/* Hover Boxes Section */
.hover-boxes-section { 
    padding: 0px 0 40px 0;
    overflow: hidden;
}
.hover-boxes-section .section-title h2 { 
        font-size: 4rem;
    font-weight: 700;
    color: #9ec43d;
    text-align: center;
    margin: 0 0 40px 0;
    text-transform: uppercase;
    
}

.hover-boxes-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    max-width: 100%;
    margin: 0 auto;
    flex-wrap: wrap;
}

.hover-box {
    position: relative;
    width: 120px;
    height: 430px;
    margin: 0 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    border-radius: 20px;
}

/* Background image - always visible */
.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: all 0.4s ease;
    border-radius: 20px;
}

.hover-content {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    top: 0;
    left: 0;
    z-index: 3;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    background: rgba(0, 0, 0, 0.8);
    padding: 0 5px 0 5px;
    box-sizing: border-box;
}
.hover-content.h-client-content {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    top: 0;
    left: 0;
    z-index: 3;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    background: #fff;
    padding: 15px;
    box-sizing: border-box;
}

.hover-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
}

.brand-logos { 
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 5px 10px;
    align-content: center;
}
.brand-logos.h-client-logos { 
    padding: 20px 10px;
    display: block;
    /* display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px; 
    align-content: center; */
}
.brand-logos.h-client-logos img { 
    width: 100%;
    height: auto;
    object-fit: contain;
}

.hover-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgb(0 0 0) 0%, rgb(0 0 0 / 62%) 50%, rgb(135 135 135 / 80%) 100%);
    z-index: 2;
    transition: opacity 0.4s ease;
        border-radius: 15px;
}

.hover-box:hover::before,
.hover-box.active::before {
    opacity: 0.3;
}

/* Show hover-content on hover or when active */
.hover-box:hover .hover-content,
.hover-box.active .hover-content {
    opacity: 1;
    visibility: visible;
        padding: 3px 20px 0px 10px;
}

/* Mobile touch improvements */
@media (max-width: 768px) {
    .hover-content {
        transition: all 0.3s ease;
    }
    
    .hover-box.active .hover-content {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Ensure content is always visible on mobile when active */
    .hover-box.active .hover-main,
    .hover-box.active .brand-logos {
        opacity: 1;
        transform: none;
    }
}

/* First hover-box open by default - only when active */
.hover-box:first-child.active .hover-content {
    opacity: 1;
    visibility: visible;
    padding: 3px 20px 0px 10px;
}

.hover-box:first-child.active {
    width: 560px;
    transform: translateY(0px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.hover-box:first-child.active::before {
    opacity: 0.3;
}

.hover-box:first-child.active .background-image {
    transform: scale(1.1);
    filter: blur(2px) brightness(0.3);
}

/* Main logo in hover content */
.main-logo {
    max-width: 100%; 
    object-fit: contain; 
    transition: all 0.4s ease;
    filter: brightness(1);
}

/* Brand logos styling */
.brand-logos img {
    width: 90px;
    height: 50px;
    object-fit: contain;
    background: #fff;
    border-radius: 2px;
    /* padding: 0px;
        border: 1px solid #373737; */
    transition: all 0.3s ease;
    opacity: 0.9;
}

.brand-logos img:hover {
    /* transform: scale(1.1); 
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3); */
     opacity: 1;
}

.hover-box:hover .background-image,
.hover-box.active .background-image {
    transform: scale(1.1);
    filter: blur(2px) brightness(0.3);
}

.hover-title {
  position: absolute;
    right: 0px;
    bottom: 70px;
    left: 0%;
    transform: translateX(0%) rotate(-90deg);
    transform-origin: center;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    z-index: 99;
    white-space: nowrap;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hover-box:hover .hover-title,
.hover-box.active .hover-title {
  transform: translateX(4%) rotate(0deg);
    bottom: 25px;
    letter-spacing: 1px;
    left: 0;
    font-size: 20px;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
}
.hover-box:hover .h-client-title,
.hover-box.active .h-client-title {
    transform: translateX(4%) rotate(0deg);
    bottom: 25px;
    letter-spacing: 0px;
    left: 0;
    font-size: 22px;
    color: #000000;
    text-shadow: none;
    font-weight: bold;
}

.hover-box:hover,
.hover-box.active {
    width: 560px;
    transform: translateY(0px); 
}
 

/* Responsive Design */
@media (min-width: 1921px) 
{

    .hover-title { 
    bottom: 100px; 
}
.brand-logos img {
    width: 100%;
    height: 60px; 
}

.hover-box { 
    width: 190px; 
}
}


@media (max-width: 1400px) 
{
    .hover-boxes-container {
        max-width: 1200px;
        gap: 5px;
    }
    .hover-box {
        width: 90px;
        height: 390px;
    }
    .hover-box.h-client-logo-box { 
        height: 430px;
    }
    .hover-box:hover,
    .hover-box.active {
        width: 530px;
    }
    .hover-box:first-child.active {
        width: 550px;
    }
    .hover-title { 
    font-size: 20px; 
        bottom: 60px;
    left: 0%;
}
}

@media (max-width: 1200px) {

    .hover-boxes-section .section-title h2 { 
        font-size: 3rem; 
    
}

    .brand-logos.h-client-logos img {
    width: 100%; 
}
.brand-logos.h-client-logos { 
    grid-template-columns: 1fr 1fr 1fr 1fr; 
}

        .hover-title {
        font-size: 17px;
        bottom: 40px;
        left: 30%;
    }
    .hover-boxes-container {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .hover-box {
        width: 70px;
        height: 350px;
    }
    .hover-box:hover,
    .hover-box.active {
        width: 450px;
    }
    .hover-box:first-child.active {
        width: 460px;
    }
    .hover-box.h-client-logo-box:first-child.active {
       width: 100%;
        margin: 0 auto;
        margin-bottom: 20px;
    }
        .hover-box.h-client-logo-box {
        height: 390px;
    }
    .brand-logos {
        gap: 8px;
        padding: 15px 8px;
    }
    .brand-logos img {
        width: 70px;
        height: 40px;
    }
}

@media (max-width: 992px) {

        .hover-boxes-section {
        padding: 10px 0;
    }

        .hover-boxes-section .section-title h2 { 
        font-size: 3rem; 
    
}

        .hover-box.h-client-logo-box:hover, .hover-box.h-client-logo-box.active { 
        height: 530px; 
    }

        .brand-logos.h-client-logos {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .hover-boxes-section {
        padding: 60px 0;
    }
    .hover-boxes-container {
        padding: 0 30px 0 30px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        max-width: 100%;
    }
    .hover-box {
        width: 200px;
        height: 350px;
        margin: 0 auto;
    }
    .hover-box:hover,
    .hover-box.active {
        width: 280px;
        transform: translateY(-5px);
    }
    .hover-box:first-child.active {
        width: 280px;
        transform: translateY(-5px);
    }
    .hover-content {
        flex-direction: column;
        padding: 15px;
        align-items: center;
        justify-content: space-between;
        background: rgba(0, 0, 0, 0.85);
    }
    .hover-main {
        width: 100%;
        margin-bottom: 15px;
        text-align: center;
        min-height: auto;
    }
    .brand-logos {
        width: 100%;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 10px;
    }
    .brand-logos img {
        width: 35px;
        height: 25px;
    }

    .brand-logos.h-client-logos img {
    width: 100%; 
    margin-top: 40px;
}
}

@media (max-width: 768px) {

        .hover-boxes-section {
        padding: 10px 0;
    }

    .background-image { 
    border-radius: 5px;
}

    .hover-box::before { 
        border-radius: 5px;
        }

        .hover-boxes-section .section-title h2 { 
        font-size: 2.2rem; 
    
        }


    .hover-boxes-section {
        padding: 40px 0;
    }
    .hover-boxes-container {
        padding: 0 30px 0 30px;
        gap: 0; 
        flex-direction: row !important;
    }
    .hover-boxes-container.h-client-logos-container {
         padding: 0 10px 0 10px;
        gap: 0;
        flex-direction: column;
        width: 100%;
    }
    .hover-box {
       width: 60px;
        height: 610px;
    }
    .hover-box.h-client-logo-box {
           width: 100%;
        height: 50px;
        margin: 0 0 10px 0;
        border-radius: 5px;
    }
    .hover-box:hover,
    .hover-box.active {
        width: 340px;
        height: 620px;
        transform: translateY(-5px);
    }
    .hover-box:first-child.active {
        width: 380px;
        transform: translateY(-5px);
    }
    .hover-title {
            font-size: 12px;
        letter-spacing: 1px;
       bottom: 50px;
        left: 0px;
    }
    .hover-title.h-client-title {
            font-size: 12px;
        letter-spacing: 1px;
        bottom: 16px;
        left: 20px;
        transform: none;
    }
    .hover-box:hover .hover-title,
    .hover-box.active .hover-title {
        font-size: 24px;
        top: 20px;
    }

        .hover-box.h-client-logo-box:hover, .hover-box.h-client-logo-box.active {
        height: 530px;
        width: 100%;
        margin: 0 auto;
        margin-bottom: 20px;
    }
    .hover-content {
        flex-direction: column;
        padding: 12px;
        align-items: center;
        justify-content: space-between;
        background: rgba(0, 0, 0, 0.9);
        border-radius: 8px;
        margin: 5px;
        width: calc(100% - 10px);
        height: calc(100% - 10px);
    }
    .hover-main {
        width: 100%;
        margin-bottom: 10px;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        flex: 1;
    }
    .main-logo {
        width: 170px;
        height: auto;
        margin-bottom: 8px;
        margin-top: 60px;
    }
    .brand-logos {
        width: 100%;
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 5px;
        padding: 8px 0;
        justify-items: center;
        align-content: center;
    }
    .brand-logos img {
        width: 70px;
        height: 40px;
    }
}


@media (max-width: 767px) {
  .hover-box:hover .hover-content,
  .hover-box.active .hover-content {
    /* Show content only when .active is present */
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .hover-box .hover-content {
    /* Hide by default */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
  }
}

@media (max-width: 576px) {

      .hover-box:hover .hover-content,
  .hover-box.active .hover-content {
    /* Show content only when .active is present */
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .hover-box .hover-content {
    /* Hide by default */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
  }

        .hover-box.h-client-logo-box:hover, .hover-box.h-client-logo-box.active {
        height: 300px; 
    }

    .hover-box:hover, .hover-box.active { 
        height: 480px; 
    }

        .hover-title {
        font-size: 12px;
        letter-spacing: 1px;
        bottom: 13px;
        left: 20px;
        transform: none;
    }

    .hover-boxes-section .section-title h2 {
    font-size: 2rem; 
    margin-bottom: 20px;
}
    .hover-boxes-section {
        padding: 10px 0;
    }
    .hover-boxes-container { 
        padding: 0 10px 0 20px;
        gap: 0;
        flex-direction: column;
    }
    .hover-box {
        width: 280px;
        height: 180px;
        max-width: 90vw;
    }
    .hover-box:hover,
    .hover-box.active {
        width: 300px;
        max-width: 95vw;
        transform: translateY(-3px);
    }
    .hover-box:first-child.active {
        width: 300px;
        max-width: 95vw;
        transform: translateY(-3px);
    }
    .hover-content {
        flex-direction: column;
        padding: 10px;
        align-items: center;
        justify-content: space-between;
        background: rgba(0, 0, 0, 0.92);
        border-radius: 12px;
        margin: 8px;
        width: calc(100% - 16px);
        height: calc(100% - 16px);
        gap: 8px;
    }
    .hover-main {
        width: 100%;
        margin-bottom: 0;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        flex: 1;
        min-height: 80px;
    }
    .main-logo {
      max-width: 100%;
        max-height: max-content;
        width: 50%;
        margin-bottom: 4px;
        object-fit: contain;
    }
   
    .hover-box:hover .hover-title,
    .hover-box.active .hover-title {
        transform: translateX(-50%) rotate(0deg);
        bottom: auto;
        font-size: 14px;
        position: relative;
    }
    .brand-logos {
        width: 100%;
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
        gap: 4px;
        padding: 5px 0;
        max-width: none;
        justify-items: center;
        align-content: end;
    }
    .brand-logos img {
        width: 45px;
        height: 28px;
        padding: 2px;
    }
}

@media (max-width: 480px) {

      .hover-box:hover .hover-content,
  .hover-box.active .hover-content {
    /* Show content only when .active is present */
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .hover-box .hover-content {
    /* Hide by default */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
  }

    .brand-logos.h-client-logos img {
    width: 100%; 
     margin: 30px 0 0 0;
}

    .hover-boxes-container {
        padding: 0 10px 0 20px;
        gap: 0;
        flex-direction: column;
    }
    .hover-box {
        width: 100%;
        height: 40px;
        max-width: 100vw;
        border-radius: 10px;
                margin: 0 0 5px 0;
    }
    .hover-box:hover,
    .hover-box.active {
        width: 98%;
    }
    .hover-box:first-child.active {
        width: 98%;
        height: 480px;
    }
    .hover-box.h-client-logo-box:first-child.active {
        width: 98%;
        height: 280px;
    }
    .hover-content {
        flex-direction: column;
        padding: 8px;
        align-items: center;
        justify-content: space-between;
        background: rgba(0, 0, 0, 0.95);
        border-radius: 10px;
        margin: 6px;
        width: calc(100% - 12px);
        height: calc(100% - 12px);
        gap: 6px;
    }
    .hover-main {
        width: 100%;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        flex: 1;
        min-height: 60px;
    }
    .main-logo {
        max-width: 100%;
        max-height: max-content;
                width: 50%;
        margin-bottom: 4px;
        object-fit: contain;
    }
     
    .hover-box:hover .hover-title,
    .hover-box.active .hover-title {
        font-size: 17px;
        top: 25px;
        left: 20px;
        position: relative;
        transform: none;
    }
    .brand-logos {
        width: 100%;
        grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
        gap: 3px;
        padding: 3px 0;
        justify-items: center;
        align-content: end;
    }
    .brand-logos img {
        width: 60px;
        height: 34px;
        padding: 1px;
        border-radius: 3px;
    }
}
