/* 
   Hybrid Automation - Custom Styles 
   Prioritizing Bootstrap 5 classes for layout and typography.
   Only custom rules for specific design effects not found in Bootstrap.
*/

:root {
    --mes-green: #16a34a;
    --mes-green-hover: #15803d;
    --mes-green-rgb: 22, 163, 74;
}

/* Stats Section - Custom Background & Blur */
.stats-bg-blur {
    margin-top: 50px;
    margin-bottom: 50px;
}

/* Custom Grid Dividers (Divide-x equivalent) */
.grid-divider-white>.col {
    border-color: rgba(255, 255, 255, 0.1) !important;
}


/* =========================================================
   Hybrid Component Slider Section
========================================================= */

.hybrid-slider-line {
    width: 32px;
    height: 4px;
}

.hybrid-slider-tracking {
    letter-spacing: 2px;
}

.hybrid-slider-card {
    width: auto;
    cursor: pointer;
}

.hybrid-slider-image-box {
    height: 128px;
    transition: all 0.3s ease;
}

.hybrid-slider-card:hover .hybrid-slider-image-box {
    border-color: rgba(25, 135, 84, 0.4) !important;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}

.hybrid-slider-card img {
    transition: transform 0.5s ease;
}

.hybrid-slider-card:hover img {
    transform: scale(1.1);
}


/* =========================================================
   Manufacturing Solutions Section
========================================================= */

.manufacturing-section-spacing {
    padding: 5rem 0;
}

@media (min-width: 768px) {
    .manufacturing-section-spacing {
        padding: 7rem 0;
    }
}

.manufacturing-line {
    width: 40px;
    height: 4px;
}

.manufacturing-tracking {
    letter-spacing: 2px;
}

.manufacturing-max-width {
    max-width: 900px;
}

.manufacturing-sticky-sidebar {
    position: sticky;
    top: 100px;
}

.manufacturing-card {
    border-radius: 1rem;
    transition: all 0.3s ease;
    display: flex !important;
    text-decoration: none !important;
    cursor: pointer;
}

.manufacturing-card:hover {
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.12);
}

.manufacturing-thumb {
    width: 112px;
    height: 80px;
    overflow: hidden;
    border-radius: 0.75rem;
}

.manufacturing-thumb img {
    transition: transform 0.5s ease;
}

.manufacturing-card:hover .manufacturing-thumb img {
    transform: scale(1.1);
}

.manufacturing-zoom-icon {
    width: 28px;
    height: 28px;
    transition: all 0.3s ease;
}

.manufacturing-card:hover .manufacturing-zoom-icon {
    background-color: var(--mes-green) !important;
}

.manufacturing-card:hover .manufacturing-zoom-icon i,
.manufacturing-card:hover .manufacturing-zoom-icon svg {
    color: #fff !important;
    stroke: #fff !important;
}

.manufacturing-zoom-icon svg {
    transition: stroke 0.3s ease, fill 0.3s ease;
}


/* =========================================================
   Manufacturing Solutions Accordion Styling
========================================================= */

#manufacturingAccordion .accordion-item {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem !important;
    overflow: hidden;
    background-color: #fff;
    transition: all 0.3s ease;
}

#manufacturingAccordion .accordion-item:hover {
    border-color: rgba(var(--mes-green-rgb), 0.3);
}

#manufacturingAccordion .accordion-button {
    background-color: #fff;
    color: #0f172a;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 1.25rem 1.5rem;
    box-shadow: none !important;
    transition: all 0.3s ease;
    border: none;
}

#manufacturingAccordion .accordion-button:not(.collapsed) {
    background-color: #f2faf6 !important;
    /* Soft light green matching the screenshot */
    color: #0f172a !important;
}

#manufacturingAccordion .accordion-item:has(.accordion-button:not(.collapsed)) {
    border-color: var(--mes-green) !important;
    /* Active green border as shown in screenshot */
    box-shadow: 0 0.5rem 1rem rgba(var(--mes-green-rgb), 0.05);
}

/* Accordion Sub-item inside body */
.accordion-sub-item {
    border-left: 3px solid var(--mes-green);
    /* Solid brand green vertical border-start */
    padding-left: 1.25rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.accordion-sub-item:last-child {
    margin-bottom: 0;
}

.accordion-sub-item-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.accordion-sub-item-desc {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 0;
}

/* =========================================================
   MES GREEN BUTTON
========================================================= */

.mes-green-button {
    background-color: var(--mes-green);
    border: 1px solid var(--mes-green);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 14px 32px;
    border-radius: 999px;
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}

.mes-green-button:hover {
    background-color: var(--mes-green-hover);
    border-color: var(--mes-green-hover);
    color: #ffffff;
    transform: translateY(-2px);
}

.mes-green-button:focus {
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(var(--mes-green-rgb), 0.25);
}

.mes-green-button:active {
    transform: translateY(0);
}


/* =========================================================
   CASE STUDIES SECTION
========================================================= */

.case-study-card {
    height: 260px;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.case-study-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.case-study-image-wrapper img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-study-card:hover .case-study-image-wrapper img {
    transform: scale(1.1);
}

.case-study-overlay {
    background: linear-gradient(to top,
            #0f172a 0%,
            rgba(15, 23, 42, 0.5) 50%,
            transparent 100%);
    transition: opacity 0.3s ease;
}

.case-study-title {
    transition: color 0.3s ease;
}

.case-study-card:hover .case-study-title {
    color: var(--mes-green) !important;
}

.case-study-desc {
    color: #cbd5e1 !important;
    font-size: 0.875rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.case-study-link {
    transition: all 0.3s ease;
    color: var(--mes-green) !important;
}

.case-study-link:hover {
    color: var(--mes-green-hover) !important;
    text-decoration: underline !important;
}


/* =========================================================
   EXPLORE CAPABILITIES BUTTON
========================================================= */

.btn-explore-capabilities {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    width: 100%;
    min-height: 2.25rem;
    padding: 1.25rem 1rem;
    background-color: var(--mes-green);
    border: 1px solid var(--mes-green);
    color: #fff !important;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-explore-capabilities:hover {
    background-color: var(--mes-green-hover);
    border-color: var(--mes-green-hover);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.btn-explore-capabilities:active {
    transform: translateY(0);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}


@media (min-width: 768px) {
    .grid-divider-white>.col:not(:first-child) {
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 767.98px) {
    .grid-divider-white>.col:nth-child(even) {
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    .grid-divider-white>.col:nth-child(n+3) {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Excellence Section Layout Helpers */
.py-lg-10 {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.w-lg-33 {
    width: 33.3333%;
}

.tracking-widest {
    letter-spacing: 0.15em;
}

/* Decorative Blur Circle */
.blur-circle-green {
    position: absolute;
    top: -2.5rem;
    right: -2.5rem;
    width: 10rem;
    height: 10rem;
    background-color: rgba(var(--mes-green-rgb), 0.2);
    filter: blur(24px);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

/* Hover Effect for Image Card */
.img-hover-zoom img {
    transition: transform 0.7s ease;
}

.img-hover-zoom:hover img {
    transform: scale(1.05);
}

/* Custom Color Overrides for exact matches if needed */
.text-mes-green {
    color: var(--mes-green);
}

.hybrid-title-green {
    color: var(--mes-green) !important;
}

.hybrid-hero-img {
    height: auto;
}

.bg-mes-green {
    background-color: var(--mes-green);
}

.border-mes-green-40 {
    border-color: rgba(var(--mes-green-rgb), 0.4) !important;
}


/* =========================================================
   WHY MES SECTION
========================================================= */

.why-mes-section {
    background-color: #0b1329;
    padding: 5rem 0;
}

@media (min-width: 768px) {
    .why-mes-section {
        padding: 7rem 0;
    }
}

.why-mes-blur-1 {
    position: absolute;
    top: -10rem;
    right: -10rem;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    background-color: rgba(var(--mes-green-rgb), 0.1);
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
}

.why-mes-blur-2 {
    position: absolute;
    bottom: -10rem;
    left: -10rem;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    background-color: rgba(var(--mes-green-rgb), 0.1);
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
}

.why-mes-left-card {
    background-color: rgba(30, 41, 59, 0.4);
    border: 1px solid #1e293b;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    transition: all 0.3s ease;
}

.why-mes-left-card:hover {
    border-color: #334155;
    background-color: rgba(30, 41, 59, 0.5);
}

.why-mes-right-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(243, 121, 50, 0.12) 0%, rgba(243, 121, 50, 0.04) 100%);
    border: 1px solid rgba(var(--mes-green-rgb), 0.4);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem 1.25rem 2rem;
    /* Add padding-left to clear the green line */
    box-shadow: 0 0 24px -6px rgba(243, 121, 50, 0.25);
    transition: all 0.3s ease;
}

.why-mes-right-card:hover {
    border-color: rgba(var(--mes-green-rgb), 0.6);
    box-shadow: 0 0 30px -4px rgba(243, 121, 50, 0.35);
}

.why-mes-card-highlight {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--mes-green);
    border-top-left-radius: 0.75rem;
    border-bottom-left-radius: 0.75rem;
}


/* =========================================================
   DCV3 CUSTOMERS TICKER SECTION
========================================================= */

.dcv3-customers-ticker-section {
    background: #0d1f3c;
    padding: 56px 0;
    overflow: hidden;
}

.dcv3-customers-head {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 32px;
}

.dcv3-customers-title {
    margin: 0;
    color: #fff;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
}

.dcv3-customers-underline {
    width: 48px;
    height: 3px;
    background: var(--mes-green);
    margin: 16px auto 0;
}

.dcv3-customers-ticker-wrap {
    position: relative;
    overflow: hidden;
}

.dcv3-customers-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 96px;
    z-index: 2;
    pointer-events: none;
}

.dcv3-customers-fade-left {
    left: 0;
    background: linear-gradient(to right, #0d1f3c 0%, rgba(13, 31, 60, 0) 100%);
}

.dcv3-customers-fade-right {
    right: 0;
    background: linear-gradient(to left, #0d1f3c 0%, rgba(13, 31, 60, 0) 100%);
}

.dcv3-logo-ticker {
    display: inline-flex;
    align-items: center;
    width: max-content;
    animation: dcv3LogoTicker 55s linear infinite;
    will-change: transform;
}

.dcv3-logo-ticker-item {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0 32px;
}

.dcv3-logo-ticker-img {
    height: 48px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.dcv3-logo-ticker-item:hover .dcv3-logo-ticker-img {
    opacity: 1;
}

.dcv3-customers-ticker-wrap:hover .dcv3-logo-ticker {
    animation-play-state: paused;
}

@keyframes dcv3LogoTicker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.bg-mes-green {
    background-color: var(--mes-green) !important;
}


/* =========================================================
   DCV3 FAQ SECTION (Green Accordion Theme)
========================================================= */

.dcv3-tagline-green {
    margin: 0 0 12px;
    color: var(--mes-green);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.dcv3-faq-section {
    background: #fff;
    border-top: 1px solid #f3f4f6;
}

.dcv3-faq-top-bar {
    height: 6px;
    background: linear-gradient(to right, var(--mes-green) 0%, #1D4681 50%, var(--mes-green) 100%);
}

.dcv3-faq-inner {
    width: 100%;
    padding: 80px 32px;
}

.dcv3-faq-head {
    text-align: center;
    margin: 0 auto 56px;
}

.dcv3-faq-title {
    margin: 0;
    color: #111827;
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1.25;
}

.dcv3-faq-head-divider {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.dcv3-faq-head-line {
    width: 64px;
    height: 1px;
    background: #e5e7eb;
}

.dcv3-faq-head-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--mes-green);
}

.dcv3-faq-list {
    margin: 0 auto;
    border: 1px solid #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    background: #fff;
}

.dcv3-faq-item+.dcv3-faq-item {
    border-top: 1px solid #e5e7eb;
}

.dcv3-faq-question-wrap {
    margin: 0;
}

.dcv3-faq-question {
    width: 100%;
    border: 0;
    background: #fff;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-align: left;
    transition: background-color 0.2s ease;
}

.dcv3-faq-question-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.dcv3-faq-number {
    width: 28px;
    flex-shrink: 0;
    color: var(--mes-green);
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.dcv3-faq-question-text {
    color: #111827;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.45;
}

.dcv3-faq-chevron {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    position: relative;
}

.dcv3-faq-chevron::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--mes-green);
    border-bottom: 2px solid var(--mes-green);
    transform: rotate(-135deg);
    transition: transform 0.3s ease;
}

.dcv3-faq-question.collapsed .dcv3-faq-chevron::before {
    transform: rotate(45deg);
}

.dcv3-faq-answer {
    background: #fff;
}

.dcv3-faq-answer-inner {
    padding: 0 24px 22px 68px;
    font-size: 16px;
    line-height: 1.7;
}

.dcv3-faq-answer-inner p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   MES CTA SECTION (Bootstrap 5 Compatible)
========================================================= */

.mes-cta-section {
    background-color: #0b1329;
    padding: 6rem 0;
}

.mes-cta-blur-1 {
    position: absolute;
    top: -8rem;
    right: -16rem;
    width: 36rem;
    height: 36rem;
    border-radius: 50%;
    background-color: rgba(var(--mes-green-rgb), 0.05);
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
}

.mes-cta-blur-2 {
    position: absolute;
    bottom: -5rem;
    left: -8rem;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    background-color: rgba(var(--mes-green-rgb), 0.05);
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
}

.mes-cta-badge {
    background-color: rgba(var(--mes-green-rgb), 0.1);
    border: 1px solid rgba(var(--mes-green-rgb), 0.3);
    color: var(--mes-green);
    border-radius: 999px;
    padding: 0.5rem 1.5rem;
    display: inline-block;
    margin-bottom: 2rem;
}

.mes-cta-stat-card {
    background-color: rgba(30, 41, 59, 0.6);
    border: 1px solid #334155;
    border-radius: 1rem;
    padding: 1.5rem 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.mes-cta-stat-card:hover {
    border-color: rgba(var(--mes-green-rgb), 0.4);
    background-color: rgba(30, 41, 59, 0.8);
}

.mes-cta-cert-bar {
    background-color: rgba(30, 41, 59, 0.4);
    border: 1px solid #334155;
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

@media (max-width: 575.98px) {
    .mes-cta-stat-card h4 {
        font-size: 1.25rem !important;
    }
}


/* =========================================================
   INLINE STYLING REFACTORING (Avoiding Inline Styles)
========================================================= */

/* Why MES Refactored Styles */
.why-mes-dot {
    width: 8px;
    height: 8px;
}

.why-mes-number-width {
    width: 24px;
}

.why-mes-desc-color {
    color: #64748b !important;
}

/* CTA Refactored Styles */
.mes-cta-top-line {
    height: 6px;
    z-index: 10;
}

.mes-cta-desc {
    max-width: 500px;
    color: #cbd5e1 !important;
}

.mes-cta-btn-outline {
    border: 1px solid #475569 !important;
    /* border-slate-600 */
    color: #ffffff !important;
    background-color: transparent;
    font-size: 0.85rem !important;
    /* text-xs */
    min-height: 2.25rem;
    /* min-h-9 equivalent */
    transition: all 0.2s ease-in-out !important;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.mes-cta-btn-outline:hover {
    background-color: #1e293b !important;
    /* hover:bg-slate-800 */
    border-color: #475569 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    /* hover-elevate */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.mes-cta-btn-outline:active {
    transform: translateY(0);
    box-shadow: none !important;
}

.mes-cta-btn-outline:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2) !important;
}

.mes-cta-stat-long-text {
    font-size: calc(1.1rem + 0.5vw) !important;
}


/* =========================================================
   Manufacturing Solutions Modal (Premium Styling)
========================================================= */

.manufacturing-modal {
    background-color: rgba(11, 19, 41, 0.95) !important;
    /* Dark slate-blue backdrop overlay */
    backdrop-filter: blur(8px);
    transition: opacity 0.4s ease-in-out;
}

.manufacturing-modal-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    z-index: 1060;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
}

.manufacturing-modal-close:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.1) rotate(90deg);
}

.manufacturing-modal-content {
    border-radius: 1.5rem !important;
    /* Rounded corners as in screenshot */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: modalSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.manufacturing-modal-image-box {
    min-height: 380px;
    padding: 3.5rem;
    border-bottom: 1px solid #f1f5f9;
}

@media (max-width: 767.98px) {
    .manufacturing-modal-image-box {
        min-height: 250px;
        padding: 2rem;
    }

    .manufacturing-modal-close {
        top: 1rem;
        right: 1rem;
    }
}

.manufacturing-modal-info {
    background-color: #f8fafc !important;
    /* Soft light grey background */
    padding: 2.5rem 3rem !important;
}

@media (max-width: 767.98px) {
    .manufacturing-modal-info {
        padding: 2rem !important;
    }
}

.manufacturing-modal-info h3 {
    font-size: 1.5rem;
    color: #0f172a !important;
    font-weight: 800 !important;
}

.manufacturing-modal-info p {
    font-size: 1rem;
    color: #475569 !important;
    line-height: 1.6;
}

/* Dynamic modal entrance animation */
@keyframes modalSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hybrid-stats-number {
    font-size: 30px;
}

@media (max-width: 1023px) {
    .hybrid-stats-number {
        font-size: 17px;
    }
}

@media (max-width: 767px) {
    .hybrid-stats-number {
        font-size: 25px;
    }

    .border-mb-end {
        border-right: 1px solid #BEC8CB;
    }
}

@media (max-width: 425px) {
    .hybrid-stats-number {
        font-size: 20px;
    }
}

@media (max-width: 767px) {
    .dcv3-faq-inner {
        padding: 80px 0px;
    }

    .dcv3-faq-question-text {
        font-size: 16px;
    }
}