/* Related Industries Section with 3D Carousel */

.related-industries-section {
    position: relative;
    padding: 80px 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    overflow: hidden;
}

/* Section Header */
.industries-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
}

.industries-header .section-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.industries-header .section-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    line-height: 1.2;
}

.industries-header .title-highlight {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.industries-header .section-description {
    font-size: 1.2rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Industries Showcase */
.industries-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 3D Carousel */
.industry-carousel {
    --card-width: 220px;
    --card-height: 280px;
    perspective: 1500px;
    width: var(--card-width);
    height: var(--card-height);
    margin: 0 auto;
    position: relative;
}

.carousel-wrapper {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    position: relative;
    transform: rotateX(-15deg);
    transition: transform 0.8s ease;
    animation: carousel-rotation 48s linear infinite;
}

.carousel-wrapper:hover {
    transform: rotateX(0deg);
    animation-play-state: paused;
}

.industry-card {
    width: var(--card-width);
    height: var(--card-height);
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.industry-card:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(99, 102, 241, 0.4);
    transform: scale(1.05);
    box-shadow: 
        0 30px 80px rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Position cards in 3D space (8 cards = 45deg each) */
.industry-card:nth-child(1) {
    transform: rotateY(0deg) translateZ(calc(var(--card-width) / (2 * tan(22.5deg))));
}
.industry-card:nth-child(2) {
    transform: rotateY(45deg) translateZ(calc(var(--card-width) / (2 * tan(22.5deg))));
}
.industry-card:nth-child(3) {
    transform: rotateY(90deg) translateZ(calc(var(--card-width) / (2 * tan(22.5deg))));
}
.industry-card:nth-child(4) {
    transform: rotateY(135deg) translateZ(calc(var(--card-width) / (2 * tan(22.5deg))));
}
.industry-card:nth-child(5) {
    transform: rotateY(180deg) translateZ(calc(var(--card-width) / (2 * tan(22.5deg))));
}
.industry-card:nth-child(6) {
    transform: rotateY(225deg) translateZ(calc(var(--card-width) / (2 * tan(22.5deg))));
}
.industry-card:nth-child(7) {
    transform: rotateY(270deg) translateZ(calc(var(--card-width) / (2 * tan(22.5deg))));
}
.industry-card:nth-child(8) {
    transform: rotateY(315deg) translateZ(calc(var(--card-width) / (2 * tan(22.5deg))));
}

/* Industry Card Content */
.industry-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    position: relative;
}

.industry-icon::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    opacity: 0;
    filter: blur(8px);
    transition: opacity 0.3s ease;
    z-index: -1;
}

.industry-card:hover .industry-icon::before {
    opacity: 0.6;
    animation: iconGlow 2s ease-in-out infinite;
}

.industry-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    line-height: 1.2;
}

.industry-content p {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.4;
}

/* Industry Details Panel */
.industry-details {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    backdrop-filter: blur(20px);
    min-height: 450px;
    height: auto;
    display: flex;
    align-items: flex-start;
    overflow: hidden;
    word-wrap: break-word;
}

.detail-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    position: absolute;
    width: calc(100% - 80px);
    left: 40px;
    top: 20px;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    word-wrap: break-word;
    height: calc(100% - 40px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.detail-card.active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
    padding: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    box-sizing: border-box;
    overflow: hidden;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.detail-card h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    flex-shrink: 0;
}

.detail-card p {
    font-size: 1rem;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    flex-shrink: 0;
}

.detail-card ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 100%;
    overflow: hidden;
    flex: 1;
    align-content: start;
}

.detail-card li {
    color: #cbd5e1;
    font-size: 0.9rem;
    position: relative;
    padding-left: 18px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    line-height: 1.3;
}

.detail-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #6366f1;
    font-weight: bold;
}

/* Call to Action */
.industries-cta {
    text-align: center;
    margin-top: 80px;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    backdrop-filter: blur(10px);
}

.industries-cta h3 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.industries-cta p {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.5);
}

.cta-button i {
    transition: transform 0.3s ease;
}

.cta-button:hover i {
    transform: translateX(4px);
}

/* Background Elements */
.industries-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.3;
}

.industries-background .bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 70%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    animation: particleDrift 25s ease-in-out infinite;
}

.industries-background .bg-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.4;
}

/* Animations */
@keyframes carousel-rotation {
    0% { transform: rotateX(-15deg) rotateY(0deg); }
    100% { transform: rotateX(-15deg) rotateY(360deg); }
}

@keyframes iconGlow {
    0%, 100% { 
        opacity: 0.6;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes particleDrift {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
    }
    33% { 
        transform: translateY(-30px) rotate(120deg);
    }
    66% { 
        transform: translateY(15px) rotate(240deg);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .industries-showcase {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }
    
    .industry-carousel {
        --card-width: 200px;
        --card-height: 260px;
    }
    
    .industries-header .section-title {
        font-size: 2.6rem;
    }
    
    .industries-header .section-description {
        font-size: 1.1rem;
        max-width: 550px;
    }
    
    .industry-details {
        min-height: 420px;
    }
}

/* Medium Tablet Breakpoint */
@media (max-width: 1024px) {
    .industries-header .section-title {
        font-size: 2.4rem;
    }
    
    .industries-header .section-description {
        font-size: 1.05rem;
        max-width: 500px;
    }
    
    .industry-carousel {
        --card-width: 190px;
        --card-height: 250px;
    }
    
    .industry-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .industry-details {
        padding: 35px 25px;
        min-height: 400px;
    }
}

/* Tablet Breakpoint */
@media (max-width: 768px) {
    .related-industries-section {
        padding: 50px 0;
    }
    
    .industries-header {
        margin-bottom: 60px;
    }
    
    .industries-header .section-badge {
        font-size: 0.85rem;
        padding: 6px 16px;
    }
    
    .industries-header .section-title {
        font-size: 2rem;
        margin-bottom: 16px;
    }
    
    .industries-header .section-description {
        font-size: 1rem;
        max-width: 450px;
        line-height: 1.5;
    }
    
    .industries-showcase {
        gap: 40px;
        padding: 0 20px;
    }
    
    .industry-carousel {
        --card-width: 170px;
        --card-height: 220px;
    }
    
    .industry-icon {
        width: 60px;
        height: 60px;
        font-size: 1.6rem;
        margin-bottom: 16px;
    }
    
    .industry-content h3 {
        font-size: 1.2rem;
        margin-bottom: 6px;
    }
    
    .industry-content p {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .industry-details {
        padding: 25px 20px;
        min-height: 380px;
        border-radius: 20px;
    }
    
    .detail-card {
        width: calc(100% - 40px);
        left: 20px;
        top: 15px;
        height: calc(100% - 30px);
    }
    
    .detail-card.active {
        padding: 0;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
    }
    
    .detail-card h4 {
        font-size: 1.25rem;
        line-height: 1.2;
        margin-bottom: 10px;
    }
    
    .detail-card p {
        font-size: 0.9rem;
        margin-bottom: 15px;
        line-height: 1.4;
    }
    
    .detail-card ul {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .detail-card li {
        font-size: 0.8rem;
        line-height: 1.3;
        padding-left: 16px;
    }
    
    .industries-cta {
        margin-top: 50px;
        padding: 35px 20px;
        border-radius: 20px;
    }
    
    .industries-cta h3 {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .industries-cta p {
        font-size: 0.95rem;
        margin-bottom: 24px;
        max-width: 400px;
    }
    
    .cta-button {
        padding: 12px 24px;
        font-size: 0.95rem;
        border-radius: 40px;
    }
}

/* Large Mobile Breakpoint */
@media (max-width: 640px) {
    .related-industries-section {
        padding: 40px 0;
    }
    
    .industries-header {
        margin-bottom: 50px;
        padding: 0 15px;
    }
    
    .industries-header .section-badge {
        font-size: 0.8rem;
        padding: 6px 14px;
        margin-bottom: 15px;
    }
    
    .industries-header .section-title {
        font-size: 1.8rem;
        margin-bottom: 14px;
        line-height: 1.1;
    }
    
    .industries-header .section-description {
        font-size: 0.95rem;
        max-width: 350px;
        line-height: 1.4;
    }
    
    .industries-showcase {
        gap: 35px;
        padding: 0 15px;
    }
    
    .industry-carousel {
        --card-width: 150px;
        --card-height: 200px;
    }
    
    .industry-icon {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
        margin-bottom: 12px;
        box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
    }
    
    .industry-content h3 {
        font-size: 1rem;
        margin-bottom: 5px;
        line-height: 1.1;
    }
    
    .industry-content p {
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    .industry-details {
        padding: 20px 15px;
        min-height: 350px;
        border-radius: 18px;
    }
    
    .detail-card {
        width: calc(100% - 30px);
        left: 15px;
        top: 12px;
        height: calc(100% - 24px);
    }
    
    .detail-card.active {
        padding: 0;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
    }
    
    .detail-card h4 {
        font-size: 1.1rem;
        line-height: 1.1;
        margin-bottom: 8px;
    }
    
    .detail-card p {
        font-size: 0.8rem;
        margin-bottom: 12px;
        line-height: 1.3;
    }
    
    .detail-card ul {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .detail-card li {
        font-size: 0.75rem;
        line-height: 1.2;
        padding-left: 14px;
    }
    
    .industries-cta {
        margin-top: 40px;
        padding: 25px 15px;
        border-radius: 18px;
    }
    
    .industries-cta h3 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .industries-cta p {
        font-size: 0.85rem;
        margin-bottom: 20px;
        max-width: 300px;
        line-height: 1.4;
    }
    
    .cta-button {
        padding: 10px 20px;
        font-size: 0.85rem;
        border-radius: 35px;
        gap: 8px;
    }
}

/* Small Mobile Breakpoint */
@media (max-width: 480px) {
    .related-industries-section {
        padding: 35px 0;
    }
    
    .industries-header {
        margin-bottom: 40px;
        padding: 0 12px;
    }
    
    .industries-header .section-badge {
        font-size: 0.75rem;
        padding: 5px 12px;
        margin-bottom: 12px;
        border-radius: 40px;
    }
    
    .industries-header .section-title {
        font-size: 1.6rem;
        margin-bottom: 12px;
        line-height: 1.1;
    }
    
    .industries-header .section-description {
        font-size: 0.85rem;
        max-width: 300px;
        line-height: 1.4;
    }
    
    .industries-showcase {
        gap: 30px;
        padding: 0 12px;
    }
    
    .industry-carousel {
        --card-width: 130px;
        --card-height: 180px;
        margin: 0 auto;
    }
    
    .industry-card {
        padding: 20px 16px;
        border-radius: 16px;
    }
    
    .industry-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        margin-bottom: 10px;
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
    }
    
    .industry-content h3 {
        font-size: 0.9rem;
        margin-bottom: 4px;
        line-height: 1.1;
    }
    
    .industry-content p {
        font-size: 0.7rem;
        line-height: 1.2;
    }
    
    .industry-details {
        padding: 18px 12px;
        min-height: 320px;
        border-radius: 16px;
    }
    
    .detail-card {
        width: calc(100% - 24px);
        left: 12px;
        top: 10px;
        height: calc(100% - 20px);
    }
    
    .detail-card.active {
        padding: 0;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
    }
    
    .detail-card h4 {
        font-size: 1rem;
        line-height: 1.1;
        margin-bottom: 6px;
    }
    
    .detail-card p {
        font-size: 0.75rem;
        margin-bottom: 10px;
        line-height: 1.3;
    }
    
    .detail-card ul {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .detail-card li {
        font-size: 0.7rem;
        line-height: 1.2;
        padding-left: 12px;
    }
    
    .detail-card li::before {
        font-size: 0.65rem;
    }
    
    .industries-cta {
        margin-top: 35px;
        padding: 20px 12px;
        border-radius: 16px;
    }
    
    .industries-cta h3 {
        font-size: 1.2rem;
        margin-bottom: 8px;
        line-height: 1.2;
    }
    
    .industries-cta p {
        font-size: 0.8rem;
        margin-bottom: 18px;
        max-width: 280px;
        line-height: 1.4;
    }
    
    .cta-button {
        padding: 10px 18px;
        font-size: 0.8rem;
        border-radius: 30px;
        gap: 6px;
    }
}

/* Extra Small Mobile (iPhone SE and similar) */
@media (max-width: 360px) {
    .related-industries-section {
        padding: 30px 0;
    }
    
    .industries-header {
        margin-bottom: 35px;
        padding: 0 10px;
    }
    
    .industries-header .section-badge {
        font-size: 0.7rem;
        padding: 4px 10px;
        margin-bottom: 10px;
    }
    
    .industries-header .section-title {
        font-size: 1.4rem;
        margin-bottom: 10px;
        line-height: 1.1;
    }
    
    .industries-header .section-description {
        font-size: 0.8rem;
        max-width: 260px;
        line-height: 1.3;
    }
    
    .industries-showcase {
        gap: 25px;
        padding: 0 10px;
    }
    
    .industry-carousel {
        --card-width: 120px;
        --card-height: 160px;
    }
    
    .industry-card {
        padding: 16px 12px;
        border-radius: 14px;
    }
    
    .industry-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        margin-bottom: 8px;
        box-shadow: 0 5px 18px rgba(99, 102, 241, 0.3);
    }
    
    .industry-content h3 {
        font-size: 0.8rem;
        margin-bottom: 3px;
        line-height: 1.1;
    }
    
    .industry-content p {
        font-size: 0.65rem;
        line-height: 1.1;
    }
    
    .industry-details {
        padding: 15px 10px;
        min-height: 280px;
        border-radius: 14px;
    }
    
    .detail-card {
        width: calc(100% - 20px);
        left: 10px;
        top: 8px;
        height: calc(100% - 16px);
    }
    
    .detail-card.active {
        padding: 0;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
    }
    
    .detail-card h4 {
        font-size: 0.9rem;
        line-height: 1.1;
        margin-bottom: 5px;
    }
    
    .detail-card p {
        font-size: 0.7rem;
        margin-bottom: 8px;
        line-height: 1.2;
    }
    
    .detail-card ul {
        gap: 4px;
    }
    
    .detail-card li {
        font-size: 0.65rem;
        line-height: 1.1;
        padding-left: 10px;
    }
    
    .detail-card li::before {
        font-size: 0.6rem;
    }
    
    .industries-cta {
        margin-top: 30px;
        padding: 18px 10px;
        border-radius: 14px;
    }
    
    .industries-cta h3 {
        font-size: 1.1rem;
        margin-bottom: 6px;
        line-height: 1.1;
    }
    
    .industries-cta p {
        font-size: 0.75rem;
        margin-bottom: 15px;
        max-width: 240px;
        line-height: 1.3;
    }
    
    .cta-button {
        padding: 8px 16px;
        font-size: 0.75rem;
        border-radius: 25px;
        gap: 5px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .carousel-wrapper {
        animation: none;
    }
    
    .industry-card:hover {
        transform: none;
    }
    
    .industries-background .bg-particles {
        animation: none;
    }
}
