/********** ADDITIONAL CUSTOM STYLES **********/

/* HOME PAGE VIDEO SECTION - color overlay adjustments */
.video-bg .overlay {
    background-color: rgba(0, 0, 0, 0.1);
}

.video-bg .image-overlay {
    background-image: url("../images/xds-logo-big.png");
    opacity: 0.85;
}

/* SERVICES */
/* FANCY BOXES - IMAGES AND COLOR OVERLAYS*/
/* Immersion cooling */
.box:nth-child(1) {
    background-image: url(../images/immersion-square.webp);
}

.box:nth-child(1) .color-overlay {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
}

/* Direct liquid cooling */
.box:nth-child(2) {
    background-image: url(../images/direct-liquid-cooling-square.webp);
}

.box:nth-child(2) .color-overlay {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
}

/* Sustainability */
.box:nth-child(3) {
    background-image: url(../images/sustainability-square.webp);
}

.box:nth-child(3) .color-overlay {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
}

/* Managed services */
.box:nth-child(4) {
    background-image: url(../images/managed-services-square.webp);
}

.box:nth-child(4) .color-overlay {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
}

/* Professional services */
.box:nth-child(5) {
    background-image: url(../images/professinal-services-square.webp);
}

.box:nth-child(5) .color-overlay {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
}

/* WORKLOAD GRID MODULES */
.services-grid {
    background-image: url("../images/Icons+background.webp");
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
}


/* INFO SECTIONS */
/* Liquid Cooling Section */
.info-section:nth-child(1) .section-bg {
    background-image: url('../images/immersion-cooling.jpg');
}

.info-section:nth-child(1)::before {
    --triangle-size: clamp(3rem, 3rem + 8vw, 10rem);
    position: absolute;
    top: 0;
    left: 50%;
    content: '';
    width: var(--triangle-size);
    height: var(--triangle-size);
    border-top: calc(var(--triangle-size) / 2) solid #000;
    border-left: calc(var(--triangle-size) / 2) solid transparent;
    border-right: calc(var(--triangle-size) / 2) solid transparent;
    bottom: 2.5rem solid transparent;
    transform: translateX(-50%);
}

.info-section:nth-child(1) .color-overlay {
    background-image: radial-gradient(circle at 50% 0%, rgba(0, 186, 205, 0.8) 0%, rgba(0, 101, 202, 0.72) 40%, rgba(0, 30, 180, 0.75) 100%);
}

/* Sustainability Section */
.info-section:nth-child(2) .section-bg {
    background-image: url('../images/Sustainability.webp');
}

.info-section:nth-child(2) .color-overlay {
    background-color: rgba(0, 0, 0, 0.2);
}

/* HERO */
.main {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.main .image-overlay {
    background-color: rgba(0, 0, 0, 0.3);
    background-image: url('../images/xds-logo-big-white-transparent-7.png');
    background-size: contain;
    background-position: left center;
    background-repeat: no-repeat;
}

.home .main {
    background: transparent url("../images/immersion-bw.webp") no-repeat center center / cover;
}

.home .main .color-overlay {
    /*background: transparent linear-gradient(180deg, rgba(0, 88, 154, 0.85) 0%, rgba(6, 0, 92, 0.85) 100%) 0% 0% no-repeat padding-box;*/
    background: transparent linear-gradient(180deg, rgba(0, 20, 235, 0.85) 0%, rgba(0, 20, 92, 0.85) 75%, rgba(0, 0, 92, 0.85) 100%) 0% 0% no-repeat padding-box;
}

/* CONTACT US */
.contact-module {
    position: relative;
    background-image: url('../images/contact-module-bg.webp');
    background-size: cover;
    background-position: center center;
    overflow: hidden;
}

/* Add diagonal pattern overlay for the homepage CTA */
.homepage-contact {
    background: linear-gradient(135deg, #000042 0%, #000020 100%);
    position: relative;
    min-height: 80px;
    display: flex;
    align-items: center;
}

.homepage-contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, #00c3ff 0%, #00ffea 100%);
    z-index: 1;
}

.homepage-contact::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, rgba(0, 0, 50, 0.4) 25%, transparent 25%),
        linear-gradient(135deg, rgba(0, 0, 50, 0.4) 25%, transparent 25%),
        linear-gradient(225deg, rgba(0, 0, 50, 0.4) 25%, transparent 25%),
        linear-gradient(315deg, rgba(0, 0, 50, 0.4) 25%, transparent 25%);
    background-size: 100px 100px;
    z-index: 0;
    opacity: 0.3;
}

/* Case study specific contact module styling - with more specific selectors */
body.case-study .contact-module,
.case-study .contact-module,
.contact-module.case-study {
    background-image: none !important;
    background: linear-gradient(90deg, #000033 0%, #0a0a2e 100%) !important;
}

.contact-module .color-overlay {
    background-color: rgba(2, 0, 52, 0.5);
    position: relative;
    z-index: 1;
}

/* Updated layout for the homepage CTA section */
.homepage-contact .image-overlay {
    padding: 1.5rem 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background-image: none;
    background-size: contain;
    background-position: right center;
    background-repeat: no-repeat;
}

.homepage-contact .image-overlay h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0;
    flex: 0 0 40%;
    text-transform: uppercase;
    line-height: 1.2;
    font-family: 'Khand', sans-serif;
}

.homepage-contact .image-overlay p {
    font-size: 1.2rem;
    margin-bottom: 0;
    flex: 0 0 35%;
}

.homepage-contact .image-overlay .btn {
    background-color: #00d8e2 !important;
    border-color: #00d8e2 !important;
    color: #000 !important;
    font-weight: bold;
    padding: 1rem 2rem;
    font-size: 1.25rem;
    text-transform: uppercase;
    border-radius: 0.25rem;
    flex: 0 0 auto;
}

.homepage-contact .image-overlay .btn:hover {
    background-color: #00c4cc !important;
    border-color: #00c4cc !important;
}

/* Standard contact module styling */
.contact-module .image-overlay {
    padding-block: calc(2rem + 1vw);
    background-image: none;
    background-size: contain;
    background-position: right center;
    background-repeat: no-repeat;
}

/* Responsive adjustments for small screens */
@media (max-width: 991px) {
    .homepage-contact .image-overlay {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .homepage-contact .image-overlay h2,
    .homepage-contact .image-overlay p {
        flex: 0 0 100%;
    }
}


/* CASE STUDY STYLES */
body.case-study {
    padding-top: 0;
}

.case-study-top-nav {
    width: 100%;
    background-color: rgba(0, 70, 192, 0.9);
    padding: 0;
    position: relative;
    z-index: 100;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

.case-study-top-nav .nav-link {
    color: white;
    padding: 1rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    font-family: 'Khand', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 0;
}

.case-study-top-nav .nav-link.active {
    background-color: rgba(0,0,0,0.3);
    border-bottom: 3px solid white;
}

/* Main case study specific styles */
.case-study .main {
    position: relative;
    height: auto;
    min-height: 50vh;
    background-image: url('../images/pattern-grid.webp'), url('../images/immersion-bw.webp');
    background-position: center;
    background-size: 100% auto, cover;
    background-repeat: repeat, no-repeat;
    background-blend-mode: overlay, normal;
}

.case-study .main .image-overlay {
    background: transparent var(--poseidon-blue-gradient) 0% 0% no-repeat padding-box;
    position: relative;
    height: 100%;
    padding: 3rem 0;
}

.case-study .main .main-inner {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.case-study .hero {
    margin-top: auto;
    padding: 2rem 0;
}

.case-study-badge {
    display: inline-block;
    background-color: #55ee00;
    color: #000;
    font-weight: bold;
    padding: 5px 15px;
    text-transform: uppercase;
    font-family: 'Khand', sans-serif;
    margin-bottom: 15px;
    font-size: 0.9rem;
    box-shadow: 0 0 15px rgba(85, 238, 0, 0.5);
}

/* Case study divider */
.case-study-divider {
    height: 5px;
    background-color: #55ee00;
    margin: 0;
    box-shadow: 0 0 10px rgba(85, 238, 0, 0.5);
}

/* Custom CTA button for case studies */
.btn-cta-green {
    background-color: #55ee00 !important;
    color: #000 !important;
    font-weight: bold;
    border: none;
    box-shadow: 0 0 10px rgba(85, 238, 0, 0.5);
    transition: all 0.2s ease;
}

.btn-cta-green:hover {
    background-color: #4cd600 !important;
    box-shadow: 0 0 15px rgba(85, 238, 0, 0.7);
    transform: translateY(-2px);
}

/* Case study impact section with gradient */
.cz-impact {
    background: linear-gradient(90deg, #0a0a2e 0%, #000033 100%);
    color: white;
    padding: 4rem 0;
}

.cz-impact:nth-child(odd) {
    background: linear-gradient(270deg, #0a0a2e 0%, #000033 100%);
}

.cz-impact .cz-lead strong {
    color: #ffffff;
}

/* Case study CTA section */
.cz-cta {
    background: linear-gradient(90deg, #000033 0%, #0a0a2e 100%);
    color: white;
    padding: 4rem 0;
}

/* Full width split sections */
.full-width-split-screen {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .full-width-split-screen {
        flex-direction: row;
    }
    
    .full-width-split-screen > img {
        width: 50%;
        height: auto;
        object-fit: cover;
        max-height: 500px;
    }
    
    .full-width-split-screen > div {
        width: 50%;
        padding: 4rem 3rem;
    }
}

.full-width-split-screen > img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
}

.full-width-split-screen > div {
    padding: 3rem 2rem;
    color: white;
}

.full-width-split-screen .title {
    font-family: 'Khand', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.blue-gradient {
    background: linear-gradient(180deg, rgba(0, 75, 235, 0.85) 0%, rgba(0, 70, 192, 0.85) 75%, rgba(0, 30, 150, 0.85) 100%);
    color: white;
    padding: 4rem 0;
}

.blue-gradient .title {
    font-family: 'Khand', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.bg-poseidon-secondary-blue {
    background-color: #0B00FF;
}

.bg-primary {
    background-color: #0D6EFD !important; /* Return to Bootstrap default blue */
    color: white !important;
}

/* Case study specific button style */
.case-study .btn-primary,
.btn-cta-green {
    background-color: #55ee00 !important;
    color: #000 !important;
    font-weight: bold;
    border: none;
    box-shadow: 0 0 10px rgba(85, 238, 0, 0.5);
    transition: all 0.2s ease;
}

/* Override for the top Contact Us button in case studies (in the impact section) */
.cz-impact .btn-cta-green {
    background-color: #55ee00 !important;
    color: #ffffff !important;
    font-weight: bold;
    border: none;
}

.case-study .btn-primary:hover,
.btn-cta-green:hover {
    background-color: #4cd600 !important;
    box-shadow: 0 0 15px rgba(85, 238, 0, 0.7);
    transform: translateY(-2px);
}

/* Homepage CTA button styling */
.btn-home-cta {
    background-color: #00d8e2 !important;
    border-color: #00d8e2 !important;
    color: #000 !important;
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    text-transform: uppercase;
    box-shadow: 0 4px 8px rgba(0, 216, 226, 0.3);
    transition: all 0.2s ease;
}

.btn-home-cta:hover {
    background-color: #00c4cc !important;
    border-color: #00c4cc !important;
    box-shadow: 0 6px 12px rgba(0, 216, 226, 0.4);
    transform: translateY(-2px);
}

.bg-primary .title {
    color: inherit;
}

/* Partners/logo styling */
.partners {
    background-color: #000;
    padding: 2rem 0;
    overflow: hidden;
}

/* Old animation style - keeping for other pages */
.partner-logos {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.animated-container {
    display: flex;
    animation: scroll 30s linear infinite;
    width: max-content;
}

.animated-container-item {
    height: 60px;
    margin-right: 2rem;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.animated-container-item:hover {
    opacity: 1;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-100% + 0px)); }
}

/* New static partners section - CodeZero Group style */
.partners-title {
    color: #a0a0a0;
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 1px;
}

.static-partner-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3.5rem;
    padding: 1rem 0 2rem;
    /* Add flex-direction to ensure partners are displayed in the correct visual order */
    flex-direction: row;
}

/* Ensure each partner logo has explicit order */
.static-partner-logos img:nth-child(1) { /* Innovate */
    order: 1;
}
.static-partner-logos img:nth-child(2) { /* GRC */
    order: 2;
}
.static-partner-logos img:nth-child(3) { /* Park Place */
    order: 3;
}
.static-partner-logos img:nth-child(4) { /* HP */
    order: 4;
}

.partner-logo {
    height: 48px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    filter: grayscale(100%) brightness(1.5);
}

.partner-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/******* PUT ANY STYLING OVERRIDES BELOW THIS LINE ******/
