:root {
    --mmt-primary: #ff6b6b;
    --mmt-secondary: #4ecdc4;
    --mmt-accent: #ffe66d;
    --mmt-dark: #2c3e50;
    --mmt-light: #f7f9fc;
    --mmt-card-bg: #ffffff;
    --mmt-text-color: #4a5568;
    --mmt-highlight-gradient: linear-gradient(135deg, #ff9966 0%, #ff5e62 100%);
}

.mmt-container {
    font-family: 'Outfit', sans-serif;
    color: var(--mmt-text-color);
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
    box-sizing: border-box;
}

.mmt-container * {
    box-sizing: border-box;
}

.mmt-section-header {
    text-align: center;
    margin-bottom: 80px;
}

.mmt-section-header h2 {
    font-size: 2.5rem;
    color: var(--mmt-dark);
    margin-bottom: 15px;
    font-weight: 700;
}

.mmt-section-header p {
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
}

/* Timeline Container */
.mmt-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

/* The central line */
.mmt-timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #e2e8f0;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
    z-index: 1;
}

/* Timeline Item */
.mmt-timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    margin-bottom: 30px;
    perspective: 1000px;
    z-index: 2;
    /* Ensure items (and dots) are above the line (z-index: 1) */
}

.mmt-left {
    left: 0;
    padding-right: 60px;
    /* Space for the dot */
    text-align: right;
}

.mmt-right {
    left: 50%;
    padding-left: 60px;
    /* Space for the dot */
    text-align: left;
}

/* Icons on the line */
.mmt-timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    /* Smaller width */
    height: 16px;
    /* Smaller height */
    right: -8px;
    /* Centered: half of 16px */
    background-color: white;
    border: 3px solid var(--mmt-primary);
    top: 45px;
    /* Aligned better with icon content */
    border-radius: 50%;
    z-index: 100;
    /* Ensure on top of line */
    transition: all 0.3s ease;
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.1);
    box-sizing: border-box;
}

.mmt-right::after {
    left: -8px;
    /* Centered: half of 16px */
}

.mmt-timeline-item:hover::after {
    background-color: var(--mmt-primary);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.4);
}

/* Content Card */
.mmt-content {
    padding: 30px;
    background-color: var(--mmt-card-bg);
    position: relative;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.03);
    overflow: hidden;
    z-index: 2;
}

.mmt-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
}

.mmt-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 12px;
    margin-bottom: 15px;
    color: var(--mmt-primary);
    font-size: 24px;
    transition: all 0.3s ease;
}

.mmt-content:hover .mmt-icon-box {
    background: var(--mmt-highlight-gradient);
    color: white;
    transform: rotateY(180deg);
}

.mmt-content:hover .mmt-icon-box i {
    transform: rotateY(-180deg);
    /* Keep icon facing forward */
}

.mmt-content h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--mmt-dark);
    font-weight: 600;
}

.mmt-content p {
    font-size: 0.95rem;
    color: #718096;
    margin: 0;
}

.mmt-desc-content {
    font-size: 0.95rem;
    color: #718096;
    line-height: 1.6;
}

.mmt-desc-content p {
    margin: 0 0 1em 0;
}

.mmt-desc-content p:last-child {
    margin-bottom: 0;
}

.mmt-desc-content ul,
.mmt-desc-content ol {
    margin: 0 0 1em 1.5em;
    padding: 0;
}

.mmt-desc-content li {
    margin-bottom: 0.5em;
}

.mmt-desc-content h1,
.mmt-desc-content h2,
.mmt-desc-content h3,
.mmt-desc-content h4,
.mmt-desc-content h5,
.mmt-desc-content h6 {
    margin: 1em 0 0.5em 0;
    color: var(--mmt-dark);
    font-weight: 600;
}

.mmt-desc-content h1:first-child,
.mmt-desc-content h2:first-child,
.mmt-desc-content h3:first-child,
.mmt-desc-content h4:first-child,
.mmt-desc-content h5:first-child,
.mmt-desc-content h6:first-child {
    margin-top: 0;
}

/* Specific Step Styling for Visual Variety */
.mmt-step-1 .mmt-icon-box {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.mmt-step-2 .mmt-icon-box {
    color: #9b59b6;
    background: rgba(155, 89, 182, 0.1);
}

.mmt-step-3 .mmt-icon-box {
    color: #e67e22;
    background: rgba(230, 126, 34, 0.1);
}

.mmt-step-4 .mmt-icon-box {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.1);
}

.mmt-step-5 .mmt-icon-box {
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.1);
}

/* Hover States for Specifics */
.mmt-content.mmt-step-1:hover .mmt-icon-box {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.mmt-content.mmt-step-2:hover .mmt-icon-box {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

.mmt-content.mmt-step-3:hover .mmt-icon-box {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: white;
}

.mmt-content.mmt-step-4:hover .mmt-icon-box {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.mmt-content.mmt-step-5:hover .mmt-icon-box {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: white;
}

.mmt-timeline-item.mmt-left .mmt-content {
    border-right: 4px solid transparent;
}

.mmt-timeline-item.mmt-left .mmt-content:hover {
    border-right: 4px solid var(--mmt-primary);
}

.mmt-timeline-item.mmt-right .mmt-content {
    border-left: 4px solid transparent;
}

.mmt-timeline-item.mmt-right .mmt-content:hover {
    border-left: 4px solid var(--mmt-primary);
}

/* Special Card: Customer Satisfaction */
.mmt-special-card .mmt-content {
    background: var(--mmt-highlight-gradient);
    color: white;
    text-align: center;
    border: none;
}

.mmt-special-card .mmt-content h3,
.mmt-special-card .mmt-content p {
    color: white;
}

.mmt-special-card .mmt-icon-box {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    width: 80px;
    height: 80px;
    font-size: 32px;
    border-radius: 50%;
}

.mmt-special-card .mmt-content:hover .mmt-icon-box {
    background: white;
    color: #ff5e62;
    transform: scale(1.1);
}

.mmt-special-card .mmt-content:hover .mmt-icon-box i {
    transform: none;
}

/* Media Queries */
@media screen and (max-width: 768px) {
    .mmt-timeline::after {
        left: 31px;
    }

    .mmt-timeline-item {
        width: 100%;
        padding-left: 70px;
        /* Keep spacing */
        padding-right: 25px;
    }

    .mmt-timeline-item::after {
        left: 23px;
        /* Adjusted for 16px dot (31px center - 8px radius) */
    }

    .mmt-left::after,
    .mmt-right::after {
        left: 23px;
    }

    .mmt-left,
    .mmt-right {
        text-align: left;
        left: 0;
    }

    .mmt-timeline-item.mmt-left .mmt-content,
    .mmt-timeline-item.mmt-right .mmt-content {
        border: none;
        border-left: 4px solid transparent;
    }

    .mmt-timeline-item.mmt-left .mmt-content:hover,
    .mmt-timeline-item.mmt-right .mmt-content:hover {
        border-left: 4px solid var(--mmt-primary) !important;
        /* Ensure override */
        border-right: none !important;
    }
}

/* Entrance Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.mmt-timeline-item {
    animation-name: fadeInUp;
    animation-duration: 0.8s;
    animation-fill-mode: both;
}

.mmt-timeline-item:nth-child(1) {
    animation-delay: 0.1s;
}

.mmt-timeline-item:nth-child(2) {
    animation-delay: 0.3s;
}

.mmt-timeline-item:nth-child(3) {
    animation-delay: 0.5s;
}

.mmt-timeline-item:nth-child(4) {
    animation-delay: 0.7s;
}

.mmt-timeline-item:nth-child(5) {
    animation-delay: 0.9s;
}

.mmt-timeline-item:nth-child(6) {
    animation-delay: 1.1s;
}

/* Horizontal Mode Styles */
.mmt-horizontal {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 80px 0 20px 0;
    margin: 0;
    max-width: none;
    position: relative;
    width: max-content;
    min-height: 400px;
    /* Allow growing beyond container */
}

.mmt-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 20px;
    /* Space for scrollbar */
    -webkit-overflow-scrolling: touch;
}

/* Horizontal Line */
.mmt-horizontal::after {
    top: 50px;
    left: 0;
    width: 100%;
    height: 4px;
    bottom: auto;
    margin-left: 0;
    margin-top: -2px;
    /* Center the line */
    z-index: 1;
}

/* Horizontal Items */
.mmt-horizontal .mmt-timeline-item {
    width: 300px;
    min-width: 300px;
    /* Fixed width for horizontal items */
    padding: 0 15px;
    margin-bottom: 0;
    margin-top: 0;
    flex-shrink: 0;
    position: relative;
}

/* All horizontal items positioned above the line */
.mmt-horizontal .mmt-timeline-item.mmt-horizontal-item {
    padding-bottom: 30px;
}

/* Horizontal Dots */
.mmt-horizontal .mmt-timeline-item::after {
    left: 50%;
    margin-left: -8px;
    right: auto;
    top: -30px;
    bottom: auto;
    z-index: 10;
    transform: translateY(-50%);
}

/* Horizontal Content borders */
.mmt-horizontal .mmt-timeline-item .mmt-content {
    border: none;
    border-bottom: 4px solid transparent;
    /* Prepare for hover */
    margin-bottom: 0;
    text-align: center;
    /* Center content in horizontal mode */
}

/* Horizontal Icon Box Positioning */
.mmt-horizontal .mmt-icon-box {
    margin: 0 auto 15px auto;
    /* Center icon and add bottom margin */
    display: flex;
}

/* Mobile Fallback for Horizontal - Force Vertical on Small Screens */
@media screen and (max-width: 768px) {
    .mmt-horizontal {
        display: block;
        width: auto;
        padding: 0;
    }

    .mmt-scroll-wrapper {
        overflow-x: visible;
    }

    .mmt-horizontal::after {
        top: 0;
        bottom: 0;
        left: 31px;
        width: 4px;
        height: auto;
        margin-top: 0;
    }

    .mmt-horizontal .mmt-timeline-item {
        width: 100%;
        margin-top: 0 !important;
        padding: 10px 40px 10px 70px;
        margin-bottom: 30px;
    }

    .mmt-horizontal .mmt-timeline-item::after {
        left: 23px;
        margin-left: 0;
        top: 45px !important;
        bottom: auto !important;
    }

    .mmt-horizontal .mmt-timeline-item .mmt-content {
        border: none !important;
        border-left: 4px solid transparent !important;
    }

    .mmt-horizontal .mmt-timeline-item:hover .mmt-content {
        border-left: 4px solid var(--mmt-primary-global) !important;
    }
}