/* Industry Morph Hero CSS v25 - Fully Responsive & Tuned */

/* ===== Hero Section ===== */
#industry-morph-hero {
    position: relative;
    width: 100%;
    /* Default height for desktop/tablet fallback */
    height: 300vh;
    background: #FAFAFA;
    /* v22: Z-Index 30 to stay above the following "Industries Grid" */
    z-index: 30;
    display: block;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

/* Force Header Visibility */
header#top {
    position: relative;
    z-index: 1001 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

header#top .navbar-brand,
header#top .nav-link,
header#top .o_header_standard_main {
    color: #1f2937 !important;
}

/* ===== Sticky Container ===== */
.morph-sticky-container {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* v23: Explicit background to prevent transparency issues */
    background: #FAFAFA;
    will-change: transform;
}

/* ===== Intro Text ===== */
.morph-intro {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 10;
    width: 80%;
    max-width: 500px;
}

.morph-intro h1 {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.morph-intro p {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #6b7280;
    text-transform: uppercase;
}

/* ===== Arc Content ===== */
.morph-content {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    text-align: center;
    pointer-events: none;
    z-index: 20;
    opacity: 0;
    width: 90%;
    max-width: 700px;
}

.morph-content h2 {
    font-size: 3rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.morph-content p {
    font-size: 1rem;
    color: #4b5563;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== Cards Container ===== */
.morph-cards-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transform-style: preserve-3d;
}

/* ===== Flip Card ===== */
.morph-card {
    position: absolute;
    cursor: pointer;
    pointer-events: auto;
    transform-style: preserve-3d;
    will-change: transform, opacity;
}

.morph-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.morph-card:hover .morph-card-inner {
    transform: rotateY(180deg);
}

.morph-card-front,
.morph-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.morph-card-front {
    background: #e5e7eb;
}

.morph-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.morph-card-back {
    background: #111827;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #374151;
    padding: 4px;
}

.morph-card-back .view-text {
    font-size: 7px;
    color: #60a5fa;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.morph-card-back .details-text {
    font-size: 9px;
    color: white;
    font-weight: 500;
}

/* ===== Mobile (< 576px) ===== */
@media (max-width: 575.98px) {
    #industry-morph-hero {
        height: 200vh;
        min-height: 200vh !important;
        z-index: 30;
        position: relative;
        overflow: visible !important;
    }

    .morph-sticky-container {
        position: absolute;
        width: 100%;
        height: 100dvh;
        overflow: visible !important;
        background: #FAFAFA !important;
        z-index: 1005;
        left: 0;
        top: 0;
    }

    .morph-intro {
        top: 45%;
        max-width: 200px !important;
        width: 60% !important;
        z-index: 1010;
    }

    .morph-intro h1 {
        font-size: 1.0rem !important;
        line-height: 1.3;
    }

    .morph-intro p {
        font-size: 0.55rem;
        letter-spacing: 0.15em;
    }

    .morph-content {
        top: 8%;
    }

    .morph-content h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .morph-content p {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .morph-card-front,
    .morph-card-back {
        border-radius: 6px;
    }
}

/* ===== Tablet (576–991px) ===== */
@media (min-width: 576px) and (max-width: 991.98px) {
    #industry-morph-hero {
        height: 270vh;
    }

    .morph-intro {
        max-width: 380px !important;
    }

    .morph-intro h1 {
        font-size: 1.8rem !important;
    }

    .morph-content h2 {
        font-size: 2rem;
    }
}

/* ===== Desktop (≥ 992px) ===== */
@media (min-width: 992px) {
    #industry-morph-hero {
        z-index: 1;
    }

    .morph-intro {
        max-width: 500px;
    }

    .morph-intro h1 {
        font-size: 2.5rem;
    }

    .morph-content h2 {
        font-size: 3rem;
    }
}