/* Mobile Fixes for "Your Tools, Enhanced by AI" Section */
/* Hides tabs and stacks all cards vertically on mobile */

@media screen and (max-width: 1024px) {

    /* Platform Section Container */
    .lawft-platform-section {
        overflow: hidden;
        padding: 180px 0 40px 0;
        width: 100%;
        margin-top: 0;
        scroll-margin-top: 80px;
    }

    /* Remove horizontal scroll behavior */
    .h-section-wrapper,
    #hWrapper {
        overflow: visible;
        overflow-x: hidden;
        height: auto;
        width: 100%;
        max-width: 100%;
    }

    .h-section,
    #hSection {
        display: block;
        width: 100%;
        max-width: 100%;
        transform: none;
        padding: 0;
        margin: 0;
        left: 0;
        right: 0;
        overflow-x: hidden;
    }

    /* Platform Intro */
    .platform-intro {
        width: 100%;
        margin-bottom: 40px;
        text-align: center;
        padding: 0 40px 20px 40px;
        box-sizing: border-box;
    }

    .platform-intro h2 {
        font-size: 32px;
        line-height: 1.3;
        margin: 0;
        font-weight: 700;
    }

    /* Hide tabs on mobile */
    .tabs,
    .tab {
        display: none;
    }

    /* Slides container — vertical stack */
    .slides,
    #slides {
        display: block;
        width: 100%;
        max-width: 100%;
        transform: none;
        margin: 0;
        padding: 0;
    }

    /* Individual slides — show all */
    .slide,
    .slide.s0,
    .slide.s1,
    .slide.s2,
    .slide.s3 {
        width: 100%;
        max-width: 100%;
        min-height: auto;
        height: auto;
        display: block;
        opacity: 1;
        visibility: visible;
        transform: none;
        position: relative;
        margin: 0 0 30px 0;
        padding: 0 40px;
        left: 0;
        right: 0;
        box-sizing: border-box;
    }

    .slide[aria-hidden="true"],
    .slide[aria-hidden="false"] {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    /* Slide inner containers */
    .slide-inner {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }

    .slide-info {
        display: block;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Panel card */
    .panel-card {
        width: 100%;
        max-width: 100%;
        padding: 28px;
        margin: 0 0 20px 0;
        border-radius: 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
        background: white;
        box-sizing: border-box;
        position: relative;
        overflow: hidden;
    }

    .panel-card .title {
        font-size: 26px;
        line-height: 1.2;
        margin: 0 0 18px 0;
        font-weight: 700;
        color: #1e293b;
    }

    .panel-card .desc {
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 20px;
        color: #4b5563;
    }

    .panel-card ul {
        list-style: none;
        padding: 0;
        margin: 0 0 20px 0;
    }

    .panel-card ul li {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 12px;
        padding-left: 28px;
        position: relative;
    }

    .panel-card ul li::before {
        content: "✓";
        position: absolute;
        left: 0;
        color: #10b981;
        font-weight: bold;
        font-size: 18px;
    }

    /* Button container */
    .panel-card > div[style*="margin-top"] {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        margin-top: 20px;
    }

    /* Buttons */
    .panel-card a,
    .panel-card .theme_Btn,
    .panel-card a.theme_Btn,
    .panel-card .sunrise-btn {
        width: 100%;
        max-width: 100%;
        text-align: center;
        padding: 14px 24px;
        font-size: 16px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        cursor: pointer;
        pointer-events: auto;
        position: relative;
        text-decoration: none;
        touch-action: manipulation;
    }

    .panel-card .button-text {
        width: 100%;
        text-align: center;
        display: block;
        pointer-events: none;
    }

    .panel-card .blue_Btn {
        background-color: #3b82f6;
        color: white;
    }

    .panel-card .green_Btn {
        background-color: #10b981;
        color: white;
    }

    /* Stats section */
    .slide-media {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin-top: 20px;
        box-sizing: border-box;
    }

    .feature-stats {
        display: flex;
        justify-content: space-around;
        gap: 20px;
        padding: 24px;
        background: #f7f5f2;
        border-radius: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .stat-item {
        text-align: center;
        flex: 1;
    }

    .stat-number {
        font-size: 28px;
        font-weight: bold;
        margin-bottom: 8px;
        color: #1e293b;
    }

    .stat-label {
        font-size: 14px;
        opacity: 0.8;
        color: #64748b;
    }

    /* Prevent horizontal overflow */
    .lawft-platform-section,
    .lawft-platform-section * {
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media screen and (max-width: 768px) {
    .platform-intro {
        padding: 0 40px 20px 40px;
    }

    .platform-intro h2 {
        font-size: 28px;
    }

    .slide,
    .slide.s0,
    .slide.s1,
    .slide.s2,
    .slide.s3 {
        padding: 0 40px 25px 40px;
    }

    .panel-card .title {
        font-size: 22px;
    }

    .panel-card .desc {
        font-size: 15px;
    }

    .stat-number {
        font-size: 24px;
    }
}

@media screen and (max-width: 480px) {
    .platform-intro h2 {
        font-size: 24px;
    }

    .panel-card .title {
        font-size: 20px;
    }

    .stat-number {
        font-size: 22px;
    }
}
