/* Mobile Fixes for "Your Tools, Enhanced by AI" Section */
/* Modified to hide tabs and show all cards vertically */

/* Target mobile devices (up to 1024px to match other mobile fixes) */
@media screen and (max-width: 1024px) {
    
    /* Platform Section Container */
    .lawft-platform-section {
        overflow: hidden !important;
        padding: 180px 0 40px 0 !important;
        width: 100% !important;
        margin-top: 0 !important;
        scroll-margin-top: 80px !important;
    }
    
    /* Remove horizontal scroll behavior on mobile */
    .h-section-wrapper,
    #hWrapper {
        overflow: visible !important;
        overflow-x: hidden !important;
        height: auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .h-section,
    #hSection {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        transform: none !important;
        padding: 0 !important;
        margin: 0 !important;
        left: 0 !important;
        right: 0 !important;
        overflow-x: hidden !important;
    }
    
    /* Platform Intro - Header Section */
    .platform-intro {
        width: 100% !important;
        margin-bottom: 40px !important;
        text-align: center !important;
        padding: 0 15px 20px 15px !important;
        box-sizing: border-box !important;
    }
    
    .platform-intro h2 {
        font-size: 32px !important;
        line-height: 1.3 !important;
        margin: 0 !important;
        padding: 0 !important;
        font-weight: 700 !important;
    }
    
    /* HIDE TABS ON MOBILE */
    .tabs {
        display: none !important;
    }
    
    .tab {
        display: none !important;
    }
    
    /* Slides Container - Show all slides vertically */
    .slides,
    #slides {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        transform: none !important;
        margin: 0 !important;
        padding: 0 !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    /* Individual Slide - Show ALL slides */
    .slide,
    .slide.s0,
    .slide.s1,
    .slide.s2,
    .slide.s3 {
        width: 100% !important;
        max-width: 100% !important;
        min-height: auto !important;
        height: auto !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        position: relative !important;
        margin: 0 0 30px 0 !important;
        padding: 0 15px !important;
        left: 0 !important;
        right: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* SHOW all slides regardless of aria-hidden */
    .slide[aria-hidden="true"],
    .slide[aria-hidden="false"] {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Slide Inner Container */
    .slide-inner {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Slide Info - Content Container */
    .slide-info {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Panel Card - Main Content Card */
    .panel-card {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 0 20px 0 !important;
        border-radius: 16px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
        background: white !important;
        box-sizing: border-box !important;
        position: relative !important;
        z-index: 10 !important;
        overflow: hidden !important;
    }
    
    /* Add colored top section to match slide color */
    .panel-card::before {
        content: "" !important;
        display: block !important;
        width: 100% !important;
        height: 8px !important;
        background: var(--slide-color, #10b981) !important;
    }
    
    /* Set color variables for each slide */
    .slide.s0 .panel-card::before {
        background: #10b981 !important; /* Green */
    }
    
    .slide.s1 .panel-card::before {
        background: #a855f7 !important; /* Purple */
    }
    
    .slide.s2 .panel-card::before {
        background: #3b82f6 !important; /* Blue */
    }
    
    .slide.s3 .panel-card::before {
        background: #f59e0b !important; /* Orange */
    }
    
    /* Add padding to card content */
    .panel-card > * {
        padding-left: 28px !important;
        padding-right: 28px !important;
    }
    
    .panel-card > *:first-of-type {
        padding-top: 28px !important;
    }
    
    .panel-card > *:last-child {
        padding-bottom: 28px !important;
    }
    
    .panel-card .title {
        font-size: 26px !important;
        line-height: 1.2 !important;
        margin: 0 0 18px 0 !important;
        padding: 0 !important;
        font-weight: 700 !important;
        color: #1e293b !important;
    }
    
    .panel-card .desc {
        font-size: 16px !important;
        line-height: 1.5 !important;
        margin-bottom: 20px !important;
        color: #4b5563 !important;
    }
    
    .panel-card ul {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 0 20px 0 !important;
    }
    
    .panel-card ul li {
        font-size: 15px !important;
        line-height: 1.6 !important;
        margin-bottom: 12px !important;
        padding-left: 28px !important;
        position: relative !important;
    }
    
    .panel-card ul li::before {
        content: "✓" !important;
        position: absolute !important;
        left: 0 !important;
        color: #10b981 !important;
        font-weight: bold !important;
        font-size: 18px !important;
    }
    
    /* Buttons Container */
    .panel-card > div,
    .panel-card > div[style*="margin-top"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
        margin-top: 20px !important;
    }
    
    /* Button Styling - CRITICAL FOR FUNCTIONALITY */
    .panel-card a,
    .panel-card .theme_Btn,
    .panel-card a.theme_Btn,
    .panel-card .sunrise-btn {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        padding: 14px 24px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        position: relative !important;
        z-index: 100 !important;
        text-decoration: none !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1) !important;
    }
    
    .panel-card .sunrise-btn-small {
        padding: 12px 20px !important;
        font-size: 15px !important;
    }
    
    /* Button text centering */
    .panel-card .button-text,
    .panel-card a .button-text,
    .panel-card .theme_Btn .button-text {
        width: 100% !important;
        text-align: center !important;
        display: block !important;
        pointer-events: none !important;
    }
    
    /* Button colors */
    .panel-card .blue_Btn {
        background-color: #3b82f6 !important;
        color: white !important;
    }
    
    .panel-card .green_Btn {
        background-color: #10b981 !important;
        color: white !important;
    }
    
    /* Slide Media - Stats Section */
    .slide-media {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin-top: 20px !important;
        box-sizing: border-box !important;
    }
    
    .feature-stats {
        display: flex !important;
        justify-content: space-around !important;
        gap: 20px !important;
        padding: 24px !important;
        background: #f7f5f2 !important;
        border-radius: 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .stat-item {
        text-align: center !important;
        flex: 1 !important;
    }
    
    .stat-number {
        font-size: 28px !important;
        font-weight: bold !important;
        margin-bottom: 8px !important;
        color: #1e293b !important;
    }
    
    .stat-label {
        font-size: 14px !important;
        opacity: 0.8 !important;
        color: #64748b !important;
    }
    
    /* Ensure no overflow issues */
    .lawft-platform-section,
    .lawft-platform-section * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Prevent horizontal scroll */
    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
}

/* Extra small devices (up to 768px) */
@media screen and (max-width: 768px) {
    .platform-intro h2 {
        font-size: 28px !important;
    }
    
    .slide,
    .slide.s0,
    .slide.s1,
    .slide.s2,
    .slide.s3 {
        padding: 0 10px 25px 10px !important;
    }
    
    .panel-card {
        padding: 20px !important;
    }
    
    .panel-card .title {
        font-size: 22px !important;
    }
    
    .panel-card .desc {
        font-size: 15px !important;
    }
    
    .stat-number {
        font-size: 24px !important;
    }
}

/* Very small devices (up to 480px) */
@media screen and (max-width: 480px) {
    .platform-intro h2 {
        font-size: 24px !important;
    }
    
    .panel-card .title {
        font-size: 20px !important;
    }
    
    .stat-number {
        font-size: 22px !important;
    }
}
