/* =================================================================
   Main Stylesheet for Mindmesh 3D
   ================================================================= */

/* 1. Root Variables & Basic Setup
-------------------------------------------------- */
:root {
    --primary: #3a86ff;
    --primary-dark: #2563eb;
    --secondary: #64748b;
    --dark: #1e293b;
    --light: #f8fafc;
    --accent: #6366f1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #334155;
    line-height: 1.6;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /*padding-top: 10px; /* Offset for sticky navbar */
}

/* 2. Navigation
-------------------------------------------------- */
.navbar {
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-logo {
    height: 70px;
    width: auto;
    margin-right: 8px;
}

@media (max-width: 1200px) {
    .navbar-logo {
        height: 50px; /* Reduce logo size on smaller screens */
    }
}

.nav-link {
    font-weight: 500;
    padding: 0.3rem 0.8rem !important; /* Reduced padding */
    color: var(--dark) !important;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link:focus, .nav-link.active {
    color: var(--primary) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 10px;
}

.dropdown-item {
    transition: all 0.2s ease;
    border-radius: 6px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
}

.dropdown-item i {
    width: 20px;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: #f1f5f9;
    color: var(--primary);
}

/* 3. Multi-level Navigation
-------------------------------------------------- */
.dropdown-submenu {
    position: relative;
}
.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -10px;
    margin-left: -1px;
}
.dropdown-submenu .dropdown-toggle::after {
    display: inline-block;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid transparent;
    border-right: 0;
    border-bottom: 0.3em solid transparent;
    border-left: 0.3em solid;
    margin-left: 0.5em;
}

/* Desktop Hover Functionality */
@media (min-width: 992px) {
    .dropdown:hover > .dropdown-menu {
        display: block;
    }
    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }
    .dropdown-submenu .dropdown-toggle::after {
        transform: rotate(+90deg);
        position: absolute;
        right: 15px;
        top: 50%;
        margin-top: -0.25em; /* Adjusts vertical centering of caret */
    }
}

/* Mobile Adjustments */
@media (max-width: 991.98px) {
    .dropdown-menu {
        box-shadow: none;
        border: 1px solid #eee;
        display: none; /* Hide by default on mobile */
    }

    .dropdown-menu.show {
        display: block; /* Show when JS adds 'show' class */
    }
    
    .dropdown-submenu > .dropdown-menu {
        position: static;
        width: 100%;
        border: none;
        padding-left: 20px;
    }

    /* Fix for intermediate screen sizes */
    .navbar-collapse {
        overflow-y: auto;
        max-height: 70vh;
    }
            
    .dropdown-menu {
        margin: 5px 0;
    }
}

    /* Intermediate screen size fix */
    @media (min-width: 768px) and (max-width: 991.98px) {
        .navbar-nav {
            flex-direction: row;
            flex-wrap: wrap;
    }
            
        .nav-item {
            margin: 2px 0;
    }
            
        .dropdown-menu {
            position: absolute;
    }
}

/* Navbar Flexbox Adjustments */
.navbar-collapse {
    flex-grow: 0;
    justify-content: flex-end;
}

.navbar-nav {
    flex-wrap: nowrap;
    display: flex;
    align-items: center;
}

/* 4. Hero Sections
-------------------------------------------------- */
.hero-section-home {
    background: linear-gradient(120deg, var(--primary), var(--accent));
    background-blend-mode: overlay;
    padding: 160px 0 120px;
    color: white;
    position: relative;
    text-align: center;
}

.hero-section {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1581092580497-e0d23cbdf1dc?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    padding: 140px 0 100px;
    color: white;
    text-align: center;
}

/* Homepage Hero Carousel (NEW) */
.hero-carousel {
    height: 100%; /* Fixed height to match images */
    position: relative;
    margin-bottom: 0;
    overflow: hidden; /* Contain the carousel */
    width: 100vw; /* Full viewport width */
    left: 50%; /* Center the carousel */
    right: 50%; /* Center the carousel */
    margin-left: -50vw; /* Offset for centering */
    margin-right: -50vw; /* Offset for centering */
}
.hero-carousel .carousel-inner {
    height: 100%; /* Make inner container full height */
}
.hero-carousel .carousel-item {
    height: auto; /* Fixed height to match images */
    /*display: flex;*/
    align-items: center; /* Center images vertically */
    justify-content: center; /* Center images horizontally */
    background-color: #000; /* Fallback background */
}
.hero-carousel .carousel-item img {
    height: auto; /* Maintain aspect ratio */
    width: 100%; /* Maintain aspect ratio */
    max-height: 100%; /* Limit to container height */
    max-width: 100%; /* Limit to container width */
    object-fit: cover; /* Cover the area without distortion */
    object-position: center;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
.hero-carousel .carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

/* Override Bootstrap container for full width */
.carousel-container {
    max-width: 100%;
    padding: 0;
}

/* Mobile Adjustments */
@media (max-width: 767.98px) {
    .hero-carousel {
        height: 60vh; /* Larger height for mobile */
        width: 100%;
        left: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .hero-carousel .carousel-item {
        height: 60vh;
    }

    .hero-carousel .carousel-item img {
        height: 100%;
        width: 100%;
        object-fit: contain;
        object-position: center;
    }

    .hero-carousel .carousel-caption h1 {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .hero-carousel .carousel-caption .lead {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .hero-carousel .carousel-caption .btn {
        font-size: 0.8rem;
        padding: 8px 16px;
    }

    .hero-carousel .carousel-caption {
        padding: 1rem;
    }
}

/* Who We Are Section */
.who-we-are-section {
    background-color: #ffffff; /* Match page background */
    padding: 3rem 0; /* Consistent padding */
}

.who-we-are-section .section-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    top: -1rem; /* Slight upward adjustment to align with content center */
}

.who-we-are-section .row.align-items-center {
    margin-top: -1rem; /* Compensate for title adjustment */
}

.who-we-are-section .lead {
    text-align: justify; /* Justify paragraph text */
    font-size: 1.1rem; /* Readable size */
    line-height: 1.6; /* Improved spacing */
    margin-bottom: 0; /* No extra margin */
}

.who-we-are-section img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 991.98px) {
    .who-we-are-section .row.align-items-center {
        flex-direction: column;
    }

    .who-we-are-section .col-lg-6 {
        width: 100%;
        margin-bottom: 2rem;
    }

    .who-we-are-section .lead {
        text-align: justify; /* Justify on mobile */
        font-size: 1rem; /* Smaller for mobile */
        line-height: 1.5; /* Adjusted spacing */
    }

    .who-we-are-section .section-title {
        font-size: 1.8rem; /* Smaller heading */
        top: 0; /* Reset on mobile */
    }

    .who-we-are-section .row.align-items-center {
        margin-top: 0; /* Reset on mobile */
    }
}

/* 5. Common Elements & Components
-------------------------------------------------- */
.section-title {
    position: relative;
    padding-bottom: 20px;
    margin-bottom: 40px;
    font-weight: 700;
    display: inline-block;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.section-title.text-center:after {
    left: 50%;
    transform: translateX(-50%);
}

.section-icon-circle {
    width: 70px;
    height: 70px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    transition: all 0.3s ease;
}

.unified-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    height: 100%;
    background: white;
}

.unified-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.unified-card:hover .section-icon-circle {
    transform: scale(1.1) rotate(10deg);
}

.mission-vision-box {
    background: var(--light);
    border-radius: 12px;
    padding: 40px;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.mission-vision-box:hover {
    transform: translateY(-5px);
}

/* Process Steps (Homepage Style with horizontal connector) */
.process-step {
    position: relative;
    text-align: center;
}
.process-step .section-icon-circle {
    font-size: 24px;
    font-weight: bold;
}
.process-step:not(:last-child):after {
    content: '';
    position: absolute;
    top: 35px;
    right: -25%;
    width: 50%;
    height: 2px;
    background: var(--primary);
    opacity: 0.2;
}
@media (max-width: 767.98px) {
    .process-step:not(:last-child):after { display: none; }
}

/* Approach Steps (About Page Vertical Timeline) */
.approach-step {
    position: relative;
    padding-left: 100px;
    padding-bottom: 40px;
}
.approach-step:last-child {
    padding-bottom: 0;
}
.approach-step .section-icon-circle {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0; /* Override auto margin */
}
.approach-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 34px;
    top: 70px;
    height: calc(100% - 30px);
    width: 2px;
    background: var(--primary);
    opacity: 0.2;
}

/* Subcategory Link Cards (Service Detail Page) */
.link-card {
    border-left: 4px solid var(--primary);
    transition: all 0.3s;
    background-color: white;
    height: 100%;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.link-card:hover {
    background-color: #f1f5f9;
    transform: translateX(5px);
    border-left-color: var(--primary-dark);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Applications / Feature List Items (Service Detail Page) */
.feature-item {
    padding: 15px;
    background: var(--light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}
.feature-item:hover {
    background-color: #eef2ff;
    transform: scale(1.03);
}
.feature-item i {
    color: var(--primary);
    font-size: 20px;
    margin-right: 15px;
    width: 25px;
    text-align: center;
}

.text-justify {
    text-align: justify;
}

/* Commitment Box (About Page) */
.commitment-box {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: 16px;
    padding: 50px;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2);
}

/* Buttons */
.btn { padding: 12px 30px; border-radius: 50px; font-weight: 600; transition: all 0.3s; }
.btn-sm { padding: 8px 20px; }
.btn-primary:hover { transform: translateY(-2px); }

/* Industry Card (UPDATED) */
.industry-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px 25px;
    height: 100%;
    transition: all 0.3s ease;
    text-align: center; /* Center align text */
}
.industry-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--primary);
}
.industry-card h5 {
    font-weight: 600;
    color: var(--dark);
    margin-top: 15px; /* Add space below icon */
}
.industry-card p {
    font-size: 0.9rem;
    color: #64748b;
}
.industry-card:hover .section-icon-circle {
    transform: scale(1.1) rotate(10deg);
}

/* 6. Gallery Carousel (NEW)
-------------------------------------------------- */
.gallery-carousel .carousel-item {
    height: 500px;
    overflow: hidden;
    border-radius: 12px;
}
.gallery-carousel .carousel-inner {
    border-radius: 12px;
}
.gallery-carousel .carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}
.gallery-carousel .carousel-caption {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 8px;
    bottom: 20px;
}
.gallery-carousel .carousel-control-prev, 
.gallery-carousel .carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}
.gallery-carousel .carousel-control-prev { left: 20px; }
.gallery-carousel .carousel-control-next { right: 20px; }
.gallery-carousel .carousel-control-prev:hover, 
.gallery-carousel .carousel-control-next:hover {
    opacity: 1;
    background: var(--primary);
}
.gallery-carousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: white;
}
.gallery-carousel .carousel-indicators .active {
    background-color: var(--primary);
}
@media (max-width: 768px) {
    .gallery-carousel .carousel-item { height: 350px; }
    .gallery-carousel .carousel-caption h5 { font-size: 1rem; }
    .gallery-carousel .carousel-caption p { font-size: 0.8rem; }
}

/* 6. Footer
-------------------------------------------------- */
footer {
    background-color: var(--dark);
    color: #cbd5e1;
    padding: 70px 0 30px;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.social-icons a {
    color: #fff;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    text-align: center;
    line-height: 40px;
    margin-right: 8px;
}
.social-icons a:hover {
    color: #4ecdc4;
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.list-unstyled li a {
    transition: color 0.3s, padding-left 0.3s;
}
.list-unstyled li a:hover {
    color: #4ecdc4 !important;
    padding-left: 8px;
}

.centered-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 30px;
}
.centered-section ul {
    display: inline-block;
    text-align: center;
    padding: 0;
}

.contact-icon {
    width: 24px;
    min-width: 20px;
    text-align: center;
    margin-right: 12px;
    color: #4ecdc4;
}

.copyright {
    text-align: center;
}
.copyright a {
    color: #4ecdc4;
    text-decoration: none;
    transition: color 0.3s;
}
.copyright a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-logo {
    font-weight: 800;
    color: #4ecdc4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-brand {
    flex: 0 0 28%;
    margin-bottom: 30px;
}
.footer-nav {
    flex: 0 0 18%;
    margin-bottom: 30px;
}
.footer-services {
    flex: 0 0 18%;
    margin-bottom: 30px;
    margin-right: 8%;
}
.footer-contact {
    flex: 0 0 28%;
    margin-bottom: 30px;
}

.footer-contact ul li {
    display: flex;
    justify-content: center;
    text-align: center;
}
@media (max-width: 992px) {
    .footer-contact ul li {
        justify-content: center;
    }
    .footer-contact ul li p {
        text-align: center;
        margin: 0;
    }
    .footer-brand, 
    .footer-nav, 
    .footer-services, 
    .footer-contact {
        flex: 0 0 48%;
    }
    .footer-services {
        margin-right: 0;
    }
}

@media (max-width: 576px) {
    .footer-brand, 
    .footer-nav, 
    .footer-services, 
    .footer-contact {
        flex: 0 0 100%;
    }
    .copyright {
        text-align: center;
    }
    .copyright p {
        margin-bottom: 10px;
    }
    .copyright ul {
        list-style: none;
        padding: 0;
        margin: 0 auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    .copyright ul li {
        margin: 5px 0;
    }
    .copyright ul li a {
        color: #cbd5e1;
        text-decoration: none;
        transition: color 0.3s;
    }
    .copyright ul li a:hover {
        color: var(--primary);
    }
}

.btn-primary {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-outline-primary {
    color: #4ecdc4;
    border-color: #4ecdc4;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-outline-primary:hover {
    background: #4ecdc4;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.spacer {
    height: 30px;
    width: 100%;
}

.content {
    flex: 1;
    padding: 2rem 0;
}

footer h5 {
    color: white;
    margin-bottom: 20px;
}
footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s;
}
footer a:hover {
    color: var(--primary);
}
.social-icons a {
    color: white;
    font-size: 20px;
}
.social-icons a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

/* 6. Accordion Styles (NEW)
-------------------------------------------------- */
.accordion-item {
    border: 1px solid #e2e8f0;
    border-radius: .75rem !important; /* Overriding bootstrap's square corners */
    margin-bottom: 1rem;
    overflow: hidden; /* Ensures the border-radius is respected */
}
.accordion-header {
    margin: 0;
}
.accordion-button {
    font-weight: 600;
    color: var(--dark);
}
.accordion-button:not(.collapsed) {
    background-color: #f1f5f9;
    color: var(--primary);
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125);
}
.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0,0,0,.125);
}
.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%233a86ff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* FIX FOR OVERLAPPING CONTENT */
.services-section {
    position: relative;
    z-index: 10;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Ensure proper spacing after hero section */
.hero-carousel + section {
    margin-top: 0;
}

/* Responsive Typography for Hero Carousel (NEW) */
@media (max-width: 767.98px) {
    .hero-carousel .carousel-caption h1 {
        font-size: 1.8rem; /* Further reduced for better fit on small screens */
        line-height: 1.3; /* Improved line spacing for wrapped text */
    }

    .hero-carousel .carousel-caption .lead {
        font-size: 1rem; /* Smaller lead text */
        margin-bottom: 2rem !important; /* Adjust spacing */
    }

    .hero-carousel .carousel-caption .btn {
        font-size: 0.9rem;
        padding: 10px 20px; /* Smaller buttons */
    }
}

/* 7. WhatsApp Chat Widget (NEW)
-------------------------------------------------- */
.whatsapp-chat-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
}

.whatsapp-chat-button {
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.whatsapp-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.whatsapp-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    overflow: hidden;
    display: none; /* Hidden by default */
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.whatsapp-chat-window.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.whatsapp-chat-header {
    background-color: var(--primary);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
}

.whatsapp-chat-header .chat-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-left: 10px;
}

.whatsapp-chat-body {
    padding: 15px;
    background-color: #f0f2f5;
    flex-grow: 1;
}

.whatsapp-chat-message {
    background-color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.whatsapp-chat-footer {
    padding: 10px;
    display: flex;
    align-items: center;
    background: #fff;
    border-top: 1px solid #eee;
}

.whatsapp-chat-footer textarea {
    flex-grow: 1;
    border: none;
    resize: none;
    padding: 8px;
    font-size: 0.9rem;
}

.whatsapp-chat-footer textarea:focus {
    outline: none;
    box-shadow: none;
}

.whatsapp-chat-footer button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-left: 10px;
    flex-shrink: 0;
}

