/* ===========================================
   SOFTWARE MAIN PAGE – TABLET RESPONSIVE (696px–1024px)
   =========================================== */

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

    /* ============================================
       FIXED SCROLL ARROWS
       Pull in from edge so they don't overlap content
       ============================================ */

    #fixed-scroll-left {
        left: 20px !important;
    }

    #fixed-scroll-right {
        right: 20px !important;
    }

    .scroll-text {
        font-size: 13px !important;
    }

    /* ============================================
       HERO SECTION
       ============================================ */

    #hero-caption .hero-title {
        font-size: clamp(60px, 10vw, 110px) !important;
        line-height: 1.1 !important;
    }

    /* ============================================
       SOFTWARE SHOWCASE WRAPPER
       ============================================ */

    .software-showcase-wrapper {
        width: calc(100% - 60px) !important;
        padding: 0 30px !important;
        gap: 50px !important;
    }

    .software-showcase-wrapper.software-showcase-top-layout {
        gap: 40px !important;
    }

    /* ============================================
       SECTION TITLE
       ============================================ */

    .software-section-title {
        font-size: 28px !important;
        line-height: 1.3 !important;
        margin: 0 0 -25px 0 !important;
    }

    /* ============================================
       SOFTWARE ITEMS GRID
       3 columns on 696–799px, 4 columns on 800–1024px
       ============================================ */

    .software-items-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 18px 14px !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px 0 !important;
    }

    /* Reset ALL negative margins */
    .software-items-grid .software-item {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .software-items-grid .software-item:nth-child(-n+4) {
        margin-top: 0 !important;
    }

    /* Reset explicit grid positioning */
    .software-items-grid .software-item:nth-child(12),
    .software-items-grid .software-item:nth-child(13) {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    /* ============================================
       SOFTWARE ITEM SIZING
       ============================================ */

    .software-item {
        width: 100% !important;
        height: auto !important;
        min-height: 90px !important;
        max-height: 120px !important;
        aspect-ratio: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        opacity: 0.5 !important;
    }

    .software-item.active {
        opacity: 1 !important;
    }

    .software-items-grid .software-item .img-mask {
        width: 100% !important;
        max-width: 160px !important;
        height: 80px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: visible !important;
        background-color: transparent !important;
    }

    .software-items-grid .software-item img {
        width: 100% !important;
        height: auto !important;
        max-height: 70px !important;
        max-width: 150px !important;
        object-fit: contain !important;
    }

    /* Drive AI - reset custom positioning */
    .software-items-grid .software-item[data-software-id="7"] img {
        left: 0 !important;
        position: relative !important;
    }

    /* Digidiner SVG */
    .software-items-grid .software-item[data-software-id="12"] img {
        max-height: 40px !important;
        max-width: 130px !important;
        margin-left: 0 !important;
    }

    /* ============================================
       SOFTWARE CONTENT BOTTOM — 2 COLUMN LAYOUT
       Maintained on tablet but with better proportions
       ============================================ */

    .software-content-bottom {
        flex-direction: row !important;
        gap: 40px !important;
        padding: 0 !important;
        padding-top: 20px !important;
        width: 100% !important;
        align-items: flex-start !important;
    }

    .software-content-left-col {
        max-width: 55% !important;
        flex: 1 1 55% !important;
        gap: 24px !important;
    }

    .software-content-right-col {
        flex: 1 1 40% !important;
        width: 40% !important;
        justify-content: center !important;
    }

    /* ============================================
       TEXT CONTENT
       ============================================ */

    .showcase-paragraph {
        font-size: 15px !important;
        line-height: 25px !important;
    }

    .software-paragraph {
        min-height: auto !important;
    }

    .two-line-text {
        font-size: 19px !important;
        line-height: 27px !important;
    }

    .software-two-lines {
        min-height: auto !important;
        margin-top: 0 !important;
    }

    .two-words-text {
        font-size: 13px !important;
    }

    /* ============================================
       COMPLIANCE & OS ROW
       ============================================ */

    .software-compliance-os-row {
        flex-direction: row !important;
        gap: 20px !important;
    }

    .rect-img-wrapper,
    .os-img-wrapper {
        width: 160px !important;
        height: 58px !important;
    }

    /* ============================================
       SQUARE IMAGE
       ============================================ */

    .software-square-image {
        width: 100% !important;
        max-width: 100% !important;
    }

    .square-img-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 1.08 !important;
    }

    /* ============================================
       BENTO GRID — 2-COLUMN TABLET LAYOUT
       Row 1: 10M+ card (full width)
       Row 2: System Uptime (left) | Restaurants (right)
       Row 3: Peak-Hour (left) | Multi-Location (right)
       ============================================ */

    .software-bento-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: 260px 360px 440px !important;
        gap: 16px !important;
        padding: 0 !important;
        margin: 0 auto !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Card 1: 10M+ — full width top row */
    .bento-card-tall {
        grid-column: 1 / -1 !important;
        grid-row: 1 !important;
        min-height: unset !important;
        height: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 10M+ card content — side-by-side */
    .bento-card-tall .bento-card-content {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px 30px !important;
        align-items: center !important;
        height: 100% !important;
    }

    .bento-card-tall .bento-stat {
        grid-column: 1 !important;
        grid-row: 1 !important;
        text-align: left !important;
        font-size: 80px !important;
        margin: 0 !important;
    }

    .bento-card-tall .bento-title {
        grid-column: 1 !important;
        grid-row: 2 !important;
        font-size: 18px !important;
        margin: 0 !important;
        text-align: left !important;
    }

    .bento-card-tall .bento-text {
        grid-column: 2 !important;
        grid-row: 1 / 3 !important;
        align-self: center !important;
        font-size: 14px !important;
        line-height: 1.6 !important;
    }

    /* Card 2: Restaurants Powered — right col, row 2 */
    .bento-card-small {
        grid-column: 2 !important;
        grid-row: 2 !important;
        height: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 25px 25px !important;
        justify-content: flex-start !important;
    }

    .bento-card-small .bento-title-purple {
        font-size: 18px !important;
        margin-bottom: 8px !important;
    }

    .bento-card-small .bento-stat-purple {
        font-size: 72px !important;
        margin-bottom: 10px !important;
    }

    .bento-card-small .bento-text-dark {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

    /* Card 3: Multi-Location Control — right col, row 3 */
    .bento-card-wide.bento-purple {
        grid-column: 2 !important;
        grid-row: 3 !important;
        height: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 30px 25px !important;
    }

    .bento-card-wide.bento-purple .bento-title-white {
        font-size: 20px !important;
        margin-bottom: 16px !important;
    }

    .bento-card-wide.bento-purple .bento-stats-row {
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
    }

    .bento-card-wide.bento-purple .bento-stat-item {
        text-align: center !important;
    }

    .bento-card-wide.bento-purple .bento-stat-cyan {
        font-size: 68px !important;
    }

    .bento-card-wide.bento-purple .bento-label {
        font-size: 12px !important;
    }

    .bento-card-wide.bento-purple .bento-stat-divider {
        width: 60px !important;
        height: 2px !important;
        margin: 8px auto !important;
    }

    .bento-card-wide.bento-purple .bento-text-white {
        margin-top: 16px !important;
        text-align: center !important;
        font-size: 12px !important;
        line-height: 1.5 !important;
    }

    /* Card 4: System Uptime — left col, row 2 */
    .bento-card-wide-bottom.bento-uptime-card {
        grid-column: 1 !important;
        grid-row: 2 !important;
        height: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 30px 25px !important;
    }

    .bento-uptime-card .bento-stat-huge {
        font-size: 88px !important;
    }

    .bento-uptime-card .bento-subtitle {
        font-size: 17px !important;
    }

    .bento-uptime-card .bento-text-white {
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

    /* Card 5: Peak-Hour Ready — left col, row 3 */
    .bento-card-small-bottom {
        grid-column: 1 !important;
        grid-row: 3 !important;
        height: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 30px 25px !important;
    }

    .bento-card-small-bottom .bento-card-content {
        display: grid !important;
        grid-template-columns: 55% 45% !important;
        grid-template-rows: auto 1fr !important;
        gap: 10px !important;
        height: 100% !important;
    }

    .bento-card-small-bottom .bento-title-purple-large {
        grid-column: 1 / -1 !important;
        grid-row: 1 !important;
        font-size: 20px !important;
        margin-bottom: 8px !important;
    }

    .bento-card-small-bottom .bento-text-dark {
        grid-column: 1 !important;
        grid-row: 2 !important;
        font-size: 13px !important;
        align-self: start !important;
    }

    .bento-card-small-bottom .bento-icon {
        position: static !important;
        grid-column: 2 !important;
        grid-row: 2 !important;
        transform: none !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .bento-card-small-bottom .bento-icon-img {
        width: 130px !important;
        height: auto !important;
        max-height: 200px !important;
    }

    /* ============================================
       FEATURE CARDS GRID — 2 COLUMNS ON TABLET
       ============================================ */

    .software-feature-cards,
    .software-kds-feature-cards,
    .software-kiosk-feature-cards {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
        width: 100% !important;
    }

    /* Reset centering transforms for kiosk 3-col rules */
    .software-kiosk-feature-cards .kiosk-feature-card:nth-last-child(2):nth-child(3n+1),
    .software-kiosk-feature-cards .kiosk-feature-card:nth-last-child(1):nth-child(3n+2) {
        transform: none !important;
    }

    /* ============================================
       UPGRADE HEADING
       ============================================ */

    .upgrade-heading-text {
        font-size: 32px !important;
        line-height: 1.3 !important;
    }

    /* ============================================
       FEATURES SHOWCASE — STACKED ON SMALLER TABLETS
       Side-by-side on larger tablets (900px+)
       ============================================ */

    .software-features-showcase {
        flex-direction: column !important;
        gap: 30px !important;
    }

    .features-menu-col {
        flex: none !important;
        width: 100% !important;
    }

    .features-menu-list {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px 10px !important;
    }

    .features-menu-item {
        font-size: 13px !important;
        padding: 8px 10px !important;
        background: #f0f0f0 !important;
        border-radius: 4px !important;
        text-align: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .features-content-col {
        width: 100% !important;
    }

    .features-content-image {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16/9 !important;
    }

    .features-content-title {
        font-size: 24px !important;
    }

    /* ============================================
       KDS BANNER
       ============================================ */

    .software-kds-banner {
        flex-direction: row !important;
        align-items: center !important;
        padding: 40px 30px !important;
        gap: 30px !important;
    }

    .kds-banner-title {
        font-size: 24px !important;
    }

    .kds-banner-text {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }

    .kds-banner-image {
        flex-shrink: 0 !important;
        max-width: 200px !important;
    }

    .kds-banner-image img {
        width: 100% !important;
    }

    /* ============================================
       FOOTER — TABLET LAYOUT
       ============================================ */

    .clapat-footer {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .clapat-footer #footer-container {
        display: flex !important;
        flex-wrap: wrap !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 30px 30px !important;
        height: auto !important;
        gap: 12px !important;
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Nav links — full width row */
    .clapat-footer #footer-container .footer-nav-links {
        order: 1 !important;
        flex: 1 1 100% !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px 20px !important;
        position: relative !important;
        transform: none !important;
        -webkit-transform: none !important;
        margin: 0 !important;
    }

    .clapat-footer #footer-container .footer-nav-links a {
        font-size: 15px !important;
        opacity: 1 !important;
        color: #fff !important;
        display: block !important;
        float: none !important;
    }

    /* Copyright */
    .clapat-footer #footer-container .footer-copyright-text {
        order: 2 !important;
        flex: 1 1 100% !important;
        text-align: center !important;
        transform: none !important;
        position: relative !important;
        margin: 5px 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .clapat-footer #footer-container .footer-copyright-text span {
        font-size: 0 !important;
        visibility: hidden !important;
        line-height: 0 !important;
    }

    .clapat-footer #footer-container .footer-copyright-text span::before {
        content: "Copyright \00A9 2026. All Rights Reserved" !important;
        font-size: 15px !important;
        visibility: visible !important;
        color: #fff !important;
        display: block !important;
        line-height: 1.4 !important;
    }

    .clapat-footer #footer-container .footer-copyright-text span a {
        display: none !important;
    }

    /* Hide Back to Top text */
    .clapat-footer #footer-container #backtotop.button-wrap .button-text {
        display: none !important;
    }

    /* Back to Top arrow */
    .clapat-footer #footer-container #backtotop.button-wrap.left {
        order: 3 !important;
        flex: 0 0 auto !important;
        position: relative !important;
        float: none !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        margin: 10px 0 0 0 !important;
        display: flex !important;
        align-items: center !important;
        pointer-events: auto !important;
    }

    .clapat-footer #footer-container #backtotop .icon-wrap {
        width: 36px !important;
        height: 36px !important;
    }

    .clapat-footer #footer-container #backtotop .button-icon {
        width: 36px !important;
        height: 36px !important;
        line-height: 36px !important;
    }

    .clapat-footer #footer-container #backtotop .button-icon i {
        color: #4814ac !important;
        font-size: 16px !important;
    }

    /* Social icons */
    .clapat-footer #footer-container .socials-wrap {
        order: 4 !important;
        flex: 0 0 auto !important;
        position: relative !important;
        float: none !important;
        display: flex !important;
        align-items: center !important;
        margin: 10px 0 0 0 !important;
        transform: none !important;
        -webkit-transform: none !important;
    }

    .clapat-footer #footer-container .socials-wrap .socials-text,
    .clapat-footer #footer-container .socials-wrap .socials-icon {
        display: none !important;
    }

    .clapat-footer #footer-container .socials-wrap .socials {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        margin: 0 !important;
        transform: none !important;
    }

    .clapat-footer #footer-container .socials-wrap .socials li {
        float: none !important;
        opacity: 1 !important;
        transform: none !important;
        margin: 0 !important;
        display: flex !important;
        width: 30px !important;
        height: 30px !important;
        line-height: 30px !important;
    }

    .clapat-footer #footer-container .socials-wrap .socials li a {
        width: 30px !important;
        height: 30px !important;
        line-height: 30px !important;
        font-size: 16px !important;
        color: #fff !important;
    }

}

/* 4-column software grid on larger tablets (800px–1024px) */
@media screen and (min-width: 800px) and (max-width: 1024px) {
    .software-items-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}
