/* Tablet and smaller desktops */
@media (max-width: 991.98px) {
    h1 {
        font-size: 42px !important;
        line-height: 1.2;
    }

    h2 {
        font-size: 32px !important;
    }

    .pt-80 {
        padding-top: 60px !important;
    }

    .specialty-card {
        margin-bottom: 20px;
    }

    /* Hero section adjustments */
    #section-intro {
        background-image: url('../images/background/6.webp') !important;
        background-size: cover !important;
        background-position: center !important;
        min-height: 450px;
        padding-top: 130px !important;
        /* Increased to clear sticky header */
    }

    #section-intro .bg-color-op-1 {
        padding: 30px !important;
    }
}

/* Mobile landscape and portrait */
@media (max-width: 767.98px) {
    h1 {
        font-size: 32px !important;
        margin-bottom: 15px;
    }

    h2 {
        font-size: 28px !important;
        margin-bottom: 15px;
    }

    h3 {
        font-size: 24px !important;
    }

    p {
        font-size: 15px !important;
    }

    /* Header */
    header {
        position: sticky !important;
        top: 0;
        background: #ffffff !important;
        z-index: 1001;
    }

    header.transparent {
        background: #ffffff !important;
    }

    #logo {
        text-align: center !important;
        width: 100% !important;
        display: block !important;
    }

    #logo img {
        max-width: 180px;
        height: auto;
        margin: 0 auto;
        display: none !important;
    }

    #logo .logo-mobile {
        display: block !important;
    }

    .header-inner {
        padding: 5px 0;
    }

    header div.col-md-12.pt-3 {
        padding-top: 0 !important;
    }

    header .de-flex.pb-3 {
        padding-bottom: 0 !important;
    }

    .de-flex {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .btn-header-cta {
        display: none !important;
    }

    /* Hide scroll logo on mobile */
    header .logo-scroll {
        display: none !important;
    }

    /* Hero Section */
    #section-intro {
        padding-top: 120px !important;
        /* Adjusted to clear sticky header */
        background-image: url('../images/background/6.webp') !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
    }

    #section-intro .bg-color-op-1 {
        background: transparent !important;
        padding: 0 !important;
    }

    .gradient-edge-top {
        display: none;
    }

    /* Form in Hero */
    #form {
        margin-top: 50px !important;
        padding: 20px !important;
    }

    /* Mission / Vision images */
    .w-50.abs {
        position: relative !important;
        width: 100% !important;
        margin-top: -30px;
        margin-bottom: 20px;
        right: auto !important;
        bottom: auto !important;
        text-align: center;
    }

    .w-90 {
        width: 100% !important;
    }

    /* Process Steps */
    .de-step {
        margin-bottom: 30px;
    }

    .de-step-arrow:after {
        display: none;
        /* Hide arrows between steps on mobile if they exist via CSS */
    }

    /* Specialties */
    .specialties-section {
        padding: 40px 0;
    }



    /* Footer */
    .de-flex-col {
        text-align: center;
        margin-bottom: 10px;
    }

    /* Adjustments for specific spacing classes */
    .spacer-double {
        height: 30px;
    }

    .mb-min-50 {
        margin-bottom: 0 !important;
    }

    /* Fix images overflowing */
    img {
        max-width: 100%;
        height: auto;
    }

    .section-padding {
        padding: 50px 0 !important;
    }

    .specialty-card {
        padding: 12px 10px !important;
        margin-bottom: 5px;
        display: flex !important;
        align-items: center;
        min-height: 70px;
        /* Ensure uniform height for consistency */
    }

    .specialty-icon {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px;
        margin-right: 8px !important;
    }

    .specialty-icon i {
        font-size: 14px !important;
    }

    .specialty-name {
        font-size: 12px !important;
        margin: 0 !important;
        line-height: 1.3 !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        flex: 1;
        /* Allow text to take remaining space and wrap */
    }

    .de-step {
        text-align: center;
        margin-bottom: 40px;
    }

    .de-step h4 {
        font-size: 18px !important;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    h1 {
        font-size: 28px !important;
    }
}