/* ============================================
   CONTENT UX/UI OPTIMIZATION
   Override inline styles, improve readability
   ============================================ */

/* === 1. NORMALIZE TYPOGRAPHY - Override Google Docs inline === */
.project-detail p span,
.project-detail p {
    font-family: 'BeVietnamPro-light', Arial, sans-serif !important;
    font-size: 15px !important;
    color: #333 !important;
    background-color: transparent !important;
    line-height: 1.8 !important;
}
.project-detail p {
    margin-bottom: 12px !important;
    padding: 0 !important;
    margin-top: 0 !important;
}

/* === 2. HEADING STYLES - Modern, consistent === */
.project-detail h2 {
    background: linear-gradient(135deg, #1a5276, #2980b9) !important;
    color: #fff !important;
    font-size: 18px !important;
    padding: 14px 20px !important;
    border-radius: 6px !important;
    margin: 35px 0 20px !important;
    display: block !important;
    line-height: 1.4 !important;
    text-transform: none !important;
    border-left: 5px solid #f7b308 !important;
    scroll-margin-top: 120px;
}
.project-detail h2 .block-icon {
    display: none !important;
}
.project-detail h2 > span {
    background: transparent !important;
    color: #fff !important;
    font-size: 18px !important;
    padding: 0 !important;
    margin: 0 !important;
}
.project-detail h3 {
    color: #1a5276 !important;
    font-size: 16px !important;
    border-bottom: 2px solid #f7b308 !important;
    padding-bottom: 8px !important;
    margin: 25px 0 15px !important;
}
.project-detail h3 > span {
    color: #1a5276 !important;
    font-size: 16px !important;
}

/* === 3. IMAGES - Better spacing & hover effect === */
.project-detail img {
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    padding: 0 !important;
    margin-bottom: 15px !important;
}
.project-detail img:hover {
    transform: scale(1.01);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* === 4. IMAGE GALLERY GRID - Consecutive images === */
.project-detail .img-gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0 20px;
}
.project-detail .img-gallery-grid img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover;
    margin-bottom: 0 !important;
}
.project-detail .img-gallery-grid .gallery-show-more {
    grid-column: 1 / -1;
    text-align: center;
    padding: 10px;
    background: #f0f7ff;
    border: 1px dashed #2980b9;
    border-radius: 8px;
    color: #2980b9;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}
.project-detail .img-gallery-grid .gallery-show-more:hover {
    background: #dceefb;
}
.project-detail .img-gallery-grid.gallery-expanded img {
    display: block !important;
}

/* === 5. FAQ ACCORDION === */
.project-detail .faq-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 15px;
}
.project-detail .faq-item {
    border-bottom: 1px solid #e0e0e0;
}
.project-detail .faq-item:last-child {
    border-bottom: none;
}
.project-detail .faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #f8fbff;
    cursor: pointer;
    font-weight: 700 !important;
    font-size: 14px !important;
    color: #2c3e50 !important;
    margin: 0 !important;
    transition: background 0.2s;
    line-height: 1.5 !important;
}
.project-detail .faq-question:hover {
    background: #edf4ff;
}
.project-detail .faq-question::after {
    content: '▼';
    font-size: 11px;
    color: #2980b9;
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 10px;
}
.project-detail .faq-item.faq-open .faq-question::after {
    transform: rotate(180deg);
}
.project-detail .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 18px;
    background: #fff;
}
.project-detail .faq-item.faq-open .faq-answer {
    max-height: 500px;
    padding: 12px 18px 16px;
}
.project-detail .faq-answer p {
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
}

/* === 7. SECTION DIVIDER === */
.project-detail .section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #d0e3f7, transparent);
    margin: 30px 0;
}

/* === 8. IMAGE LIGHTBOX === */
.img-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
}
.img-lightbox-overlay.active {
    opacity: 1;
}
.img-lightbox-overlay img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: none !important;
    transform: none !important;
}
.img-lightbox-close {
    position: fixed;
    top: 20px;
    right: 25px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    z-index: 10001;
    font-weight: 300;
}

/* === 9. READING PROGRESS BAR === */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, #f7b308, #e74c3c);
    z-index: 99999;
    width: 100%;
    transform-origin: left;
    transform: scaleX(0);
    will-change: transform;
    pointer-events: none;
}

/* === 10. RESPONSIVE === */
@media (max-width: 767px) {
    .project-detail h2 {
        font-size: 15px !important;
        padding: 12px 14px !important;
    }
    .project-detail h3 {
        font-size: 14px !important;
    }
    .project-detail p span,
    .project-detail p {
        font-size: 14px !important;
    }
    .project-detail .img-gallery-grid {
        grid-template-columns: 1fr;
    }
    .project-detail .img-gallery-grid img {
        height: 180px !important;
    }
}

/* Fix mobile image overflow */
.project-detail img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
}
.project-detail p {
    overflow: hidden;
    max-width: 100%;
}
.project-detail .img-gallery-grid {
    max-width: 100%;
    overflow: hidden;
}
@media (max-width: 768px) {
    .project-detail img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }
    .project-detail p img {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Fix header nav overflow */
.header .header-bottom {
    padding: 7px 15px;
}
.header .header-bottom nav.menu {
    gap: 6px;
    font-size: 14px;
}
.header .header-bottom .logo {
    margin: 0 30px;
    width: 140px;
}


@media (max-width: 768px) {
    
    .project-detail table td,
    .project-detail table th {
        padding: 6px 8px !important;
        word-break: break-word;
    }
    
    .project-detail img {
        max-width: 100%;
        height: auto !important;
    }
}

/* ═══ TABLES — OPTIMIZED UX ═══ */

/* Base table */
.project-detail table {
    width: 100% !important;
    max-width: 100%;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 15px 0 20px;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}
.project-detail table thead,
.project-detail table tbody {
    display: table;
    width: 100%;
}
.project-detail table tr {
    display: table-row;
}
.project-detail table td,
.project-detail table th {
    display: table-cell;
}
.project-detail table thead th {
    background: #1a5276;
    color: #fff !important;
    padding: 11px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-align: left;
    white-space: nowrap;
    border: none !important;
}
.project-detail table tbody td {
    padding: 10px 14px !important;
    font-size: 13px !important;
    border-bottom: 1px solid #eaeef2 !important;
    vertical-align: middle;
    line-height: 1.5 !important;
}
.project-detail table tbody tr:nth-child(even) {
    background: #f7f9fb;
}
.project-detail table tbody tr:hover {
    background: #edf4ff;
}

/* Table 0: Info key-value */
.project-detail .tb-info .tb-label {
    width: 130px;
    color: #666;
    font-size: 12.5px !important;
    padding: 9px 12px !important;
    white-space: nowrap;
    border-bottom: 1px solid #eef1f5 !important;
    background: #fafbfc;
}
.project-detail .tb-info .tb-value {
    padding: 9px 14px !important;
    font-size: 13px !important;
    border-bottom: 1px solid #eef1f5 !important;
}
.project-detail .tb-info .tb-value strong {
    color: #1a5276;
}
.project-detail .tb-info .tb-value small {
    color: #888;
    font-size: 11px;
}

/* Table 3: Pricing */
.project-detail .tb-price s {
    color: #999;
    font-size: 12px;
}
.project-detail .price-hot {
    color: #c0392b !important;
    font-weight: 700;
}
.project-detail .discount {
    color: #fff;
    background: #e74c3c;
    border-radius: 4px;
    padding: 2px 6px !important;
    font-size: 11px !important;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

/* Table 4: Compare */
.project-detail .highlight-row {
    background: #fff8e1 !important;
    border-left: 3px solid #f7b308;
}
.project-detail .highlight-row:hover {
    background: #fff3cd !important;
}

/* Status badges */
.project-detail .badge-green {
    background: #d4edda;
    color: #155724;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.project-detail .badge-yellow {
    background: #fff3cd;
    color: #856404;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.project-detail .badge-gray {
    background: #e9ecef;
    color: #6c757d;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* Mobile */
@media (max-width: 768px) {
    .project-detail table {
        font-size: 12px !important;
    }
    .project-detail table thead th {
        font-size: 11px !important;
        padding: 8px 10px !important;
        white-space: normal;
    }
    .project-detail table tbody td {
        padding: 7px 10px !important;
        font-size: 12px !important;
    }
    .project-detail .tb-info .tb-label {
        width: 100px;
        font-size: 11px !important;
    }
    .project-detail .tb-compare,
    .project-detail .tb-price {
        min-width: 500px;
    }
    .project-detail img {
        max-width: 100%;
        height: auto !important;
    }
}

/* ═══ ARENA CARDS — Mobile-first UX ═══ */

/* Table 0: Info Grid */
.arena-info-grid {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
    margin: 15px 0;
}
.ai-row {
    display: flex;
    border-bottom: 1px solid #f2f3f5;
}
.ai-row:last-child { border-bottom: none; }
.ai-label {
    width: 120px;
    flex-shrink: 0;
    background: #fafbfc;
    padding: 11px 14px;
    font-size: 12px;
    color: #7a8a9e;
    font-weight: 500;
    border-right: 1px solid #f2f3f5;
}
.ai-value {
    flex: 1;
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #1a3a5c;
    line-height: 1.45;
}
.ai-value small { font-weight: 400; color: #97a5b7; font-size: 11px; }
.ai-tag {
    display: inline-block;
    background: #e8f5ed;
    color: #1b7a3d;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 3px;
    font-weight: 600;
    margin-left: 4px;
    letter-spacing: 0.2px;
}

/* Table 1: Distance List */
.arena-dist-list {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
    margin: 15px 0;
}
.ad-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f2f3f5;
}
.ad-item:last-child { border-bottom: none; }
.ad-name { flex: 1; font-size: 13px; color: #333; font-weight: 500; }
.ad-km {
    font-size: 13px;
    font-weight: 700;
    color: #1a5276;
    min-width: 60px;
    text-align: right;
}
.ad-time {
    font-size: 11px;
    color: #999;
    min-width: 60px;
    text-align: right;
    margin-left: 6px;
}
.ad-badge {
    background: #1a5276;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 3px;
    letter-spacing: 0.2px;
}

/* Table 2: Tower Cards */
.arena-tower-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 15px 0;
}
.at-card {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
    border: 1px solid #eef0f3;
    display: flex;
    align-items: center;
    gap: 14px;
}
.at-code {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, #0d3b5e, #1a5276);
    color: #fff;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    font-weight: 800;
    flex-shrink: 0;
}
.at-info { flex: 1; }
.at-name { font-size: 14px; font-weight: 700; color: #1a3a5c; }
.at-meta { font-size: 12px; color: #8a9ab5; margin-top: 2px; }
.at-status {
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 3px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    flex-shrink: 0;
    white-space: nowrap;
}
.at-status.on { background: #e8f5ed; color: #1b7a3d; }
.at-status.soon { background: #fef7e0; color: #9a7b20; }
.at-status.plan { background: #f0f1f3; color: #7a8599; }

/* Table 3: Price Cards */
.arena-price-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}
.ap-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
    border-left: 3px solid #1a5276;
}
.ap-card.hot { border-left-color: #c0392b; }
.ap-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
}
.ap-type { font-size: 14px; font-weight: 700; color: #1a3a5c; }
.ap-area { font-size: 11px; color: #8a9ab5; font-weight: 500; }
.ap-body { padding: 14px 16px; }
.ap-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.ap-left { flex: 1; }
.ap-old { font-size: 12px; color: #aab3c0; text-decoration: line-through; }
.ap-new { font-size: 20px; font-weight: 800; color: #c0392b; line-height: 1.1; margin-top: 4px; }
.ap-pct {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: #c0392b;
    padding: 3px 9px;
    border-radius: 3px;
    white-space: nowrap;
    align-self: center;
}

/* Table 4: Compare Cards */
.arena-cmp-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}
.ac-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
    border: 1px solid #eef0f3;
}
.ac-card.best {
    border: 1.5px solid #c9a84c;
    background: #fefdfb;
}
.ac-badge {
    font-size: 10px;
    font-weight: 700;
    color: #c9a84c;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.ac-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.ac-name { font-size: 15px; font-weight: 700; color: #1a3a5c; }
.ac-price {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 3px;
}
.ac-price.low { background: #fde8e8; color: #b5312c; }
.ac-price.mid { background: #fef7e0; color: #8a6d15; }
.ac-price.high { background: #e6eef8; color: #1a5276; }
.ac-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.ac-tag {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 3px;
    background: #f4f6f8;
    color: #556880;
    font-weight: 500;
}
.ac-desc {
    font-size: 12.5px;
    color: #6b7c93;
    line-height: 1.5;
    padding-top: 10px;
    border-top: 1px solid #f2f3f5;
}
.ac-desc strong { color: #1a3a5c; font-weight: 600; }

/* Mobile fine-tune */
@media (max-width: 768px) {
    .ai-label { width: 100px; font-size: 11px; padding: 9px 10px; }
    .ai-value { padding: 9px 12px; font-size: 12.5px; }
    .at-status { font-size: 9px; padding: 3px 7px; }
    .ap-new { font-size: 18px; }
}

/* Fix: prevent first column text wrap in tables */
.project-detail table tbody td:first-child {
    white-space: nowrap;
}
.project-detail table thead th {
    white-space: nowrap;
}

/* Fix: normalize ul/li font size same as paragraphs */
.project-detail .content ul,
.project-detail .content ol,
.project-detail .content li {
    font-family: 'BeVietnamPro-light', Arial, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.8 !important;
    color: #333 !important;
}
.project-detail .content ul {
    padding-left: 20px;
    margin: 10px 0;
}
.project-detail .content li {
    margin-bottom: 6px;
}

/* Fix strong: force all text in content to same size */
.project-detail .content ul li,
.project-detail .content ul li strong,
.project-detail .content ul li b,
.project-detail .content ol li,
.project-detail .content ol li strong,
.project-detail .content ol li b {
    font-size: 15px !important;
    line-height: 1.8 !important;
    font-family: 'BeVietnamPro-light', Arial, sans-serif !important;
}

/* Fix: direct .project-detail children (no .content wrapper) */
.project-detail ul li,
.project-detail ol li,
.project-detail ul li strong,
.project-detail ul li b,
.project-detail ol li strong,
.project-detail ol li b {
    font-size: 15px !important;
    line-height: 1.8 !important;
    font-family: 'BeVietnamPro-light', Arial, sans-serif !important;
    color: #333 !important;
}
.project-detail ul {
    padding-left: 20px !important;
    margin: 10px 0 !important;
}
.project-detail li {
    margin-bottom: 6px !important;
}

/* === HIDE BANNER ON PRODUCT DETAIL === */
.land-detail-container {
    margin-top: -20px !important;
}
.page-banner + .page-content-container.land-detail-container {
    padding-top: 0 !important;
}
/* Hide the "Dự Án" banner on detail pages */
.intro-banner {
    display: none !important;
}

/* === FIX: Reset margins when banner is hidden === */
.intro-banner + .land-detail-container {
    margin-top: 0 !important;
}
.land-detail-container .land-detail-content {
    margin-top: 0 !important;
}

/* === FIX: Carousel fixed height - prevent layout shift === */
.land-detail-content-top .carousel .carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.land-detail-content-top .carousel .carousel-inner .item {
    width: 100%;
}
.land-detail-content-top .main-land-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0f0f0;
}
.land-detail-content-top .main-land-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.land-detail-content-top .list-land-images {
    height: 70px;
    overflow: hidden;
}
.land-detail-content-top .list-land-images .land-image-item img {
    height: 60px;
    object-fit: cover;
    width: 100%;
}
@media (max-width: 767px) {
    .land-detail-content-top .main-land-image {
        aspect-ratio: 16 / 10;
    }
    .land-detail-content-top .list-land-images {
        height: 55px;
    }
    .land-detail-content-top .list-land-images .land-image-item img {
        height: 48px;
    }
}
