@media (max-width: 768px) {

    /* --- Layout & Grid --- */
    .blog-layout,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blog-sidebar {
        position: static;
    }

    .blog-content {
        padding: 0 10px !important;
        margin-top: 0 !important;
    }

    /* Blog card title size on mobile only */
    .post-title,
    .post-title a {
        font-size: 16px !important;
        line-height: 1.4;
    }

    /* --- Related Services Grid --- */
    .services-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 20px;
        padding: 0 !important;
    }

    .service-card {
        display: flex;
        flex-direction: column;
        width: 100% !important;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .service-card img {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
        object-fit: cover;
    }

    .service-content {
        padding: 12px !important;
        display: flex;
        flex-direction: column;
    }

    .service-content h3 {
        font-size: 18px;
        margin-bottom: 10px;
        color: #1a2b3c;
    }

    /* --- Meta Info (Location/Duration) --- */
    .service-meta {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 12px;
        font-size: 12px;
        color: #666;
        margin-bottom: 12px;
    }

    /* --- Price & Button Row (THE FIX) --- */
    .price-action-row {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 0 !important;
        gap: 10px !important;
    }

    .service-price {
        display: flex !important;
        flex-direction: column !important;
        padding-left: 20px !important;
    }

    .service-price .from-text {
        font-size: 12px !important;
        color: #888 !important;
        font-weight: 400 !important;
        line-height: 1.2 !important;
        margin-bottom: 2px !important;
    }

    .service-price .amount {
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #1a2b3c !important;
        line-height: 1.2 !important;
    }

    .book-now-btn {
        display: inline-flex !important;
        align-items: center !important;
        height: 36px !important;
        padding: 0 12px !important;
        background: #1a2b3c !important;
        color: white !important;
        border-radius: 8px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        gap: 5px !important;
        flex-shrink: 0 !important;
        margin-left: auto !important;
    }

    /* --- Other Blog Elements --- */
    .post-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        font-size: 0.85rem;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form input {
        width: 100%;
    }

    /* --- Responsive iFrames (Google Maps, etc) --- */
    .post-body iframe {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
        border: 0;
        border-radius: 8px;
        margin: 15px 0;
    }
}

@media (max-width: 480px) {

    /* Blog Page - Maximized Space */
    .blog-page {
        padding: 10px 0;
        /* Reduced vertical padding */
    }

    .blog-content {
        padding: 0 10px !important;
        /* Maximum 10px horizontal padding for full width */
    }

    /* Post Card */
    .post-content {
        padding: 15px;
    }

    /* Optimized Post Meta for Small Screens */
    .post-meta {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
        /* Slightly smaller gap on very small screens */
        font-size: 0.85rem;
        color: #6c757d;
        margin: 6px 0 10px;
        /* Even more compact spacing */
        padding: 6px 0;
    }

    .post-meta span {
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 3px;
        /* Tighter spacing between icon and text */
    }

    .post-meta i {
        font-size: 0.7rem;
        /* Even smaller icons on tiny screens */
        opacity: 0.8;
    }

    /* Sidebar Widgets */
    .sidebar-widget {
        padding: 20px;
        margin-bottom: 20px;
    }

    .sidebar-widget h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    /* Tags */
    .tags-cloud {
        gap: 6px;
    }

    .tag {
        padding: 5px 10px;
        font-size: 12px;
    }

    /* Single Post */
    .post-content h1 {
        font-size: 16px;
        margin: 15px 0 20px;
    }

    .post-body {
        font-size: 15px;
        line-height: 1.6;
    }

    .post-body h2 {
        font-size: 16px;
        margin: 25px 0 12px;
    }

    .post-body h3 {
        font-size: 18px;
        margin: 20px 0 10px;
    }

    /* Related Services */
    .related-services h2 {
        font-size: 24px;
    }

    .service-content {
        padding: 15px;
        /* Override mobile compact padding for 480px+ */
    }

    .service-content h3 {
        font-size: 16px;
    }

    .service-meta {
        font-size: 14px;
        /* Slightly larger for 480px+ */
        gap: 15px;
        margin-bottom: 20px;
    }

    .price-action-row {
        flex-direction: row !important;
        align-items: center !important;
        margin-top: 12px;
        padding-top: 10px;
    }

    .price-action-row .service-price .amount {
        font-size: 18px;
        /* Larger price for bigger screens */
    }

    .book-now-btn {
        display: inline-flex !important;
        align-items: center !important;
        align-self: center !important;
        height: 36px !important;
        padding: 10px 16px;
        font-size: 14px;
        /* Larger button for bigger screens */
    }

    /* Active state for tactile feedback on mobile */
    .book-now-btn:active {
        transform: scale(0.97);
    }

    .book-now-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    }

    /* For very small screens - ensure proper spacing */
    @media (max-width: 360px) {
        .blog-content {
            padding: 0 8px !important;
            /* Even more compact horizontal padding for very small screens */
        }

        .service-content {
            padding: 8px;
        }

        .service-meta {
            gap: 8px;
            margin-top: 4px;
            font-size: 11px;
        }

        .service-meta .meta-item i {
            font-size: 10px;
        }

        .price-action-row {
            margin-top: 6px;
            padding-top: 4px;
            flex-direction: row !important;
            /* Ensure horizontal layout */
            align-items: center !important;
        }

        .book-now-btn {
            display: inline-flex !important;
            align-items: center !important;
            align-self: center !important;
            height: 36px !important;
            padding: 6px 10px;
            font-size: 11px;
        }
    }

    /* Pagination */
    .page-link,
    .page-number {
        padding: 6px 12px;
        font-size: 14px;
    }

    /* Search */
    .search-form input {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    .search-form button {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .post-card {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .post-card:hover {
        transform: none;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .service-card:hover {
        transform: none;
    }

    .read-more:hover {
        gap: 8px;
    }

    .tag:hover {
        background: #f0f0f0;
        color: #666;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {

    .post-card,
    .service-card {
        border: 1px solid #000;
    }

    .sidebar-widget {
        border: 1px solid #000;
    }

    .post-meta,
    .service-meta {
        border-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    .post-card,
    .service-card,
    .post-image img,
    .read-more {
        transition: none;
    }

    .page-link,
    .page-number,
    .search-form button,
    .book-now-btn {
        transition: none;
    }

    .tag {
        transition: none;
    }
}