﻿/* =========================================================
   HOANGHA BLOG - TABLET*/

@media (min-width: 641px) and (max-width: 1024px) {
    body {
        font-size: 14px;
    }

    .container {
        width: min(100% - 24px, 960px);
    }

    .page-bg {
        padding: 14px 0 24px;
        background: #f8fafc;
    }

    .main-layout {
        grid-template-columns: minmax(0, 1fr) 260px;
        gap: 14px;
    }

    .sidebar {
        gap: 12px;
    }

    /* ADS */
    .top-ad-inner {
        height: 70px;
    }

    .silver-meteor {
        width: 85px;
    }

    .ad-wide img {
        height: 60px;
    }

    .ad-side {
        min-height: 150px;
        font-size: 17px;
    }

    /* HEADER */
    .header-inner {
        min-height: auto;
        padding: 10px 0;
        grid-template-columns: 52px minmax(0, 1fr) auto;
        gap: 10px;
    }

    .logo-image {
        width: 48px;
        height: 48px;
    }

    .hot-header {
        font-size: 13px;
        gap: 9px;
    }

    .search-box {
        grid-column: 1 / -1;
        grid-row: 2;
        height: 36px;
    }

    .header-actions {
        justify-self: end;
        gap: 7px;
    }

    .social-icon {
        width: 32px;
        height: 32px;
    }

    /* TRACK / SLIDER */

    /* SECTION / POST */
    .section-block {
        padding: 13px;
        margin-bottom: 14px;
        border-radius: 14px;
    }

    .section-title h2 {
        font-size: 19px;
    }

    .four-column {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* WIDGET */
    .widget {
        padding: 12px;
        border-radius: 14px;
    }

        .widget h3 {
            font-size: 16px;
        }

    /* CATEGORY / INVESTOR */
    .category-hero {
        padding: 16px 18px;
        margin-bottom: 12px;
        border-radius: 14px;
    }

        .category-hero h1 {
            font-size: 21px;
        }

        .category-hero p {
            font-size: 13px;
            line-height: 1.45;
        }

    .category-tabs {
        gap: 7px;
        margin-bottom: 12px;
    }

        .category-tabs a {
            padding: 7px 11px;
            font-size: 12px;
        }

    .category-block {
        padding: 12px;
    }

    .category-grid,
    .investor-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .category-card,
    .investor-card {
        min-height: auto;
        padding: 10px;
        gap: 10px;
        border-radius: 13px;
    }

        .category-card .post-thumb {
            flex: 0 0 104px;
            width: 104px;
            height: 70px;
            border-radius: 11px;
        }

        .category-card h3,
        .investor-info h3 {
            font-size: 14px;
        }

        .category-card p,
        .investor-info p {
            font-size: 12px;
        }

    .investor-logo {
        flex: 0 0 56px;
        width: 56px;
        height: 56px;
    }

    .category-body p {
        display: none;
    }

    .category-body h3 {
        font-size: 13px;
    }
    /* DETAIL */
    .detail-content,
    .detail-comments {
        padding: 18px;
        border-radius: 12px;
    }

        .detail-content h1 {
            font-size: 28px;
        }

        .detail-content > img {
            max-height: 380px;
        }

    #article-body {
        font-size: 15px;
        line-height: 1.72;
    }

        #article-body h2 {
            font-size: 22px;
        }

        #article-body h3 {
            font-size: 18px;
        }

    .feedback-grid,
    .comment-feedback-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    /* FOOTER */
    .footer {
        padding-top: 30px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .brand-strip {
        padding: 14px 16px;
        margin-bottom: 14px;
        border-radius: 12px;
    }

        .brand-strip b {
            font-size: 18px;
        }

    /* SEARCH PAGE */
    .search-page .search-top {
        padding: 22px 0 16px;
    }

    .search-page .search-title {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .search-page .search-form {
        max-width: 100%;
        height: 48px;
    }

    .search-page .search-input {
        font-size: 15.5px;
    }

    .search-page .search-result {
        gap: 15px;
        padding: 17px 0;
    }

    .search-page .result-title {
        font-size: 19px;
    }

    .search-page .result-desc {
        font-size: 14px;
    }

    .search-page .result-thumb {
        flex-basis: 108px;
        width: 108px;
        height: 78px;
    }

    .search-page .mini-thumb {
        width: 68px;
        height: 68px;
    }

    .search-page .search-result-mini {
        padding: 7px 7px 7px 0;
        margin-right: 7px;
    }

    .search-page .google-pagination {
        margin-top: 24px;
    }

    .search-page .search-result-ads {
        padding: 13px;
        gap: 13px;
    }

    .search-page .ads-thumb {
        flex-basis: 78px;
        width: 78px;
        height: 58px;
    }

    .search-page .ads-title {
        font-size: 17px;
    }

    /* PROPERTY DETAIL */
    .property-hero-full {
        min-height: 560px;
    }

    .property-hero-content {
        max-width: 760px;
        padding-top: 96px;
    }

        .property-hero-content h1 {
            font-size: 44px;
        }

        .property-hero-content p {
            font-size: 15px;
        }

    .property-glance {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

        .property-glance div {
            padding: 15px;
            border-radius: 16px;
        }

        .property-glance b {
            font-size: 15px;
        }

    .property-gallery-motion {
        grid-template-columns: 1.2fr 1fr;
        grid-auto-rows: 170px;
    }

        .property-gallery-motion .gallery-big {
            grid-row: span 2;
        }

    .property-section-title h2 {
        font-size: 28px;
    }

    .property-overview-card {
        padding: 22px 24px;
    }

    .property-feature-row {
        grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr);
        gap: 14px;
        padding: 14px;
        border-radius: 20px;
    }

        .property-feature-row.reverse {
            grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
        }

    .property-feature-img {
        height: auto;
        border-radius: 16px;
    }

    .property-feature-text {
        padding: 6px 8px;
    }

        .property-feature-text h2,
        .property-overview-card h2,
        .property-booking-inner h2 {
            font-size: 26px;
        }

    .property-rich-content {
        font-size: 14.5px;
        line-height: 1.72;
    }

    .property-booking-inner {
        grid-template-columns: 1fr 1fr;
        gap: 22px;
    }

    .property-booking-form {
        padding: 16px;
    }

    .post-suggestions-columns {
        gap: 12px;
    }

    .post-suggestion-item {
        grid-template-columns: 74px minmax(0, 1fr);
        gap: 8px;
    }

        .post-suggestion-item img {
            width: 74px;
            height: 54px;
        }
    /*du an- form gui thong tin*/
    .property-booking-wide {
        padding: 48px 0;
    }

        .property-booking-wide > .property-booking-inner {
            grid-template-columns: 42% 58%;
            gap: 24px;
            padding: 0 16px;
        }

            /* text */

            .property-booking-wide > .property-booking-inner > div:first-child {
                max-width: 100%;
                text-align: left;
            }

                .property-booking-wide > .property-booking-inner > div:first-child > h2 {
                    font-size: 30px;
                    line-height: 1.2;
                    margin: 14px 0 10px;
                }

                .property-booking-wide > .property-booking-inner > div:first-child > p {
                    max-width: 100%;
                    font-size: 14px;
                    line-height: 1.7;
                }

            /* form */

            .property-booking-wide > .property-booking-inner > .lead-box {
                width: 100%;
                max-width: 100%;
                padding: 18px;
                border-radius: 18px;
                box-sizing: border-box;
            }

                .property-booking-wide > .property-booking-inner > .lead-box > form {
                    display: grid;
                    grid-template-columns: 1fr 1fr;
                    gap: 12px;
                }

    /* dòng 1 */

    #nameBk {
        grid-column: 1;
    }

    #phoneBk {
        grid-column: 2;
    }

    /* dòng 2 */

    #emailBk {
        grid-column: 1;
    }

    #bookingSubmitBtn {
        grid-column: 2;
        grid-row: 2;
        min-height: 52px;
    }

    /* dòng 3 */

    #messageBk {
        grid-column: 1 / -1;
        min-height: 120px;
    }

    .property-booking-wide > .property-booking-inner > .lead-box > form > input,
    .property-booking-wide > .property-booking-inner > .lead-box > form > textarea {
        width: 100%;
        padding: 13px 14px;
        font-size: 14px;
        box-sizing: border-box;
    }
}

/* =========================================================
   IPAD DỌC / TABLET NHỎ: 641px - 820px
   Ghi đè có chủ đích lên breakpoint tablet lớn.
   ========================================================= */
@media (min-width: 641px) and (max-width: 820px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .category-grid,
    .investor-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-card {
        align-items: flex-start;
    }

        .category-card .post-thumb {
            flex: 0 0 90px;
            width: 90px;
            height: 62px;
        }

    .ad-side.sticky-ad {
        position: static;
        top: auto;
    }

    /* ABOUT PAGE */
    .hh-about-hero {
        padding: 38px 0 34px;
    }

    .hh-about-hero-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hh-about-hero-content {
        padding: 30px;
    }

    .hh-about-hero h1 {
        font-size: 34px;
    }

    .hh-about-hero p {
        font-size: 16px;
    }

    .hh-about-hero-card {
        padding: 24px;
    }

    .hh-section-heading h2 {
        font-size: 30px;
    }

    .hh-why-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .hh-why-box {
        padding: 22px;
    }

        .hh-why-box h3,
        .hh-value-card h3 {
            font-size: 18px;
        }

    .hh-purpose-grid {
        grid-template-columns: 1fr;
    }

    .hh-purpose-left h2 {
        font-size: 29px;
    }

    .hh-value-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hh-value-card {
        min-height: 150px;
    }

    .hh-topics-box {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .hh-topics-title h2 {
        font-size: 28px;
    }

    .hh-author-card {
        grid-template-columns: 140px 1fr;
        gap: 22px;
    }

    .hh-author-avatar img {
        width: 130px;
        height: 130px;
        border-radius: 28px;
    }

    .hh-author-info h2 {
        font-size: 27px;
    }

    .hh-cta-box h2 {
        font-size: 28px;
    }

    .pagination {
        gap: 7px;
        margin: 28px 0 6px;
    }

        .pagination .page-link {
            min-width: 40px;
            height: 40px;
            padding: 0 13px;
            border-radius: 11px;
            font-size: 13.5px;
        }
}

/* =========================================================
   TABLET STICKY AD: 821px - 1024px
   Sidebar còn nằm bên phải nên sticky vẫn chạy.
   ========================================================= */
@media (min-width: 821px) and (max-width: 1024px) {
    .sidebar > .sticky-ad,
    .ad-side.sticky-ad {
        position: sticky;
        top: 76px;
        align-self: flex-start;
        width: 100%;
        z-index: 20;
    }

    .page-bg,
    .main-layout,
    .sidebar {
        overflow: visible;
    }
}

@media (min-width: 641px) and (max-width: 760px) {
    .extended-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

        .extended-category-grid article:nth-child(n+5) {
            display: none;
        }
}