/* Mobile styles - Optimized for iPhone SE (375x667) and similar devices */
@media screen and (max-width: 768px) {
    :root {
        --header-height: calc(80 * 100vh / 667);
        --section-spacing: calc(40 * 100vh / 667);
        --panel-spacing: calc(30 * 100vh / 667);
        --text-spacing: calc(20 * 100vh / 667);
        --content-padding: clamp(1rem, 3vw, 2rem);
        --panel-width: clamp(280px, 85vw, 400px);
        --panel-height: clamp(200px, 40vh, 300px);
        --panel-padding: min(4vw, 1rem);
        --icon-size: min(6vw, 2rem);
        --card-gap: min(3vh, 1rem);
    }

    .content-wrapper {
        margin: 0 auto;
        padding: 0;
    }

    .dev-section {
        width: 100%;
        position: relative;
        padding: var(--section-spacing) 1rem;
    }

   p {
    align-items: center;
    text-align: center;
   }

    section.dev-section.hero-section.fade-in > div > h1 {
        margin-top: -8vh;
        font-size: 40px;
    }

    .section-header .header-text {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Hero section specific */
    .hero-section {
        min-height: calc(200 * 100vh / 667);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: calc(140 * 100vh / 667) 0 calc(40 * 100vh / 667);
    }

    body > section.dev-section.hero-section > div > h1 {
        margin-top: -30px;
        font-size: 40px;
        line-height: 1.5;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        word-spacing: 9999px;
        height: auto;
        white-space: pre-line;
    }

    .section-header {
        font-size: calc(32 * 100vw / 375);
        margin-bottom: var(--text-spacing);
        width: 100%;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .section-subtitle {
        font-size: 18px;
        font-weight: 800;
        letter-spacing: 1px;
        margin-bottom: calc(30 * 100vh / 667);
        text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
    }

    /* Override desktop grid layout */
    .dev-section .solutions-container {
        display: flex;
        flex-direction: column;
        gap: calc(30 * 100vh / 667);
        width: 100%;
        margin-bottom: calc(20 * 100vh / 667);
    }

    .dev-section .solution-card {
        width: 100%;
        margin-bottom: calc(25 * 100vh / 667);
        border-radius: 8px;
        padding: calc(20 * 100vh / 667) calc(15 * 100vw / 375);
    }

    .card-title {
        font-size: calc(24 * 100vw / 375);
        margin-bottom: calc(25 * 100vh / 667);
    }

    .card-title::after {
        bottom: calc(-10 * 100vh / 667);
    }

    .dev-section .solution-items {
        display: flex;
        flex-direction: column;
        gap: calc(25 * 100vh / 667);
        width: 100%;
    }

    .solution-item {
        border-radius: 8px;
        padding: calc(25 * 100vh / 667) calc(20 * 100vw / 375);
        /* Display as a flex container */
        display: flex;
        /* Stack children vertically */
        flex-direction: column;
        /* Spread content evenly */
        justify-content: space-between;
        /* Center items horizontally */
        align-items: center;
        gap: 0;
        width: 100%;
        box-sizing: border-box;
        min-height: calc(140 * 100vh / 667);
    }

    .solution-item i {
        font-size: calc(32 * 100vw / 375);
        margin: auto 0;
        padding: calc(15 * 100vh / 667) 0;
    }

    .solution-item h4 {
        font-size: calc(20 * 100vw / 375);
        margin: 0;
    }

    .solution-item p {
        font-size: calc(16 * 100vw / 375);
        margin: 0;
        padding-bottom: calc(10 * 100vh / 667);
    }

    /* Override any desktop grid layouts */
    .solutions-container,
    .solution-items {
        display: flex;
        flex-direction: column;
        grid-template-columns: unset;
    }

    /* Footer overrides */
    #footer-frame footer {
        width: 100%;
        max-width: none;
    }
}
