/* === STICKY HEADER === */
.header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}
.header.scrolled {
    box-shadow: 0 2px 15px rgba(0,0,0,0.15);
}
.header-top {
    max-height: 50px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}
.header.scrolled .header-top {
    max-height: 0 !important;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
}

/* CTA button in header */
.header-cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none !important;
    animation: pulse-cta 2s infinite;
    white-space: nowrap;
    margin-left: 15px;
}
.header-cta-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: scale(1.05);
}
@keyframes pulse-cta {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

/* === MOBILE STICKY CTA BAR === */
.mobile-cta-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
    z-index: 99998;
    padding: 8px 0;
}
.mobile-cta-bar .cta-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    padding: 0 10px;
}
.mobile-cta-bar .cta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    color: #333;
    font-size: 11px;
    font-weight: 600;
    flex: 1;
    padding: 4px 2px;
}
.mobile-cta-bar .cta-item .cta-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3px;
    font-size: 16px;
}
.mobile-cta-bar .cta-item.cta-call .cta-icon {
    background: #e74c3c;
    color: #fff;
}
.mobile-cta-bar .cta-item.cta-zalo .cta-icon {
    background: #0068ff;
    color: #fff;
}
.mobile-cta-bar .cta-item.cta-register .cta-icon {
    background: #27ae60;
    color: #fff;
}
.mobile-cta-bar .cta-item.cta-map .cta-icon {
    background: #f39c12;
    color: #fff;
}

/* === EXIT-INTENT POPUP === */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 999999;
    justify-content: center;
    align-items: center;
}
.popup-overlay.active {
    display: flex;
}
.popup-content {
    background: #fff;
    border-radius: 12px;
    max-width: 420px;
    width: 90%;
    overflow: hidden;
    animation: popupSlide 0.3s ease;
    position: relative;
}
@keyframes popupSlide {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.popup-header {
    background: linear-gradient(135deg, #1a5276, #2980b9);
    color: #fff;
    padding: 20px;
    text-align: center;
}
.popup-header h3 {
    margin: 0 0 5px 0;
    font-size: 20px;
}
.popup-header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}
.popup-body {
    padding: 20px;
}
.popup-body input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}
.popup-body input:focus {
    border-color: #2980b9;
    outline: none;
}
.popup-body .btn-popup-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}
.popup-body .btn-popup-submit:hover {
    transform: scale(1.02);
}
.popup-trust {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 10px 20px 15px;
    font-size: 12px;
    color: #666;
}
.popup-trust span::before {
    content: "✅ ";
}
.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    opacity: 0.8;
}
.popup-close:hover {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-cta-bar {
        display: block;
    }
    .header-cta-btn {
        display: none;
    }
    /* Tang khoang cach footer de khong bi che boi CTA bar */
    footer {
        padding-bottom: 70px !important;
    }
    /* Di chuyen Zalo/Phone icon len cao hon */
    #button-contact-vr {
        bottom: 75px !important;
    }
}

@media (min-width: 769px) {
    .mobile-cta-bar {
        display: none !important;
    }
}

/* === TRUST BADGES === */
.trust-badges-section {
    background: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 15px;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}
.trust-icon {
    font-size: 18px;
}

/* === STATS === */
.stats-section {
    background: linear-gradient(135deg, #1a5276, #2980b9);
    padding: 30px 15px;
}
.stats-container {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}
.stat-item {
    text-align: center;
    color: #fff;
}
.stat-number {
    font-size: 36px;
    font-weight: 800;
    display: block;
    line-height: 1.2;
}
.stat-percent {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.stat-label {
    font-size: 13px;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === TESTIMONIAL === */
.testimonial-section {
    padding: 40px 15px;
    background: #fff;
    text-align: center;
}
.section-heading {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 25px;
}
.testimonial-slider {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    min-height: 180px;
}
.testimonial-card {
    display: none;
    animation: fadeIn 0.5s ease;
}
.testimonial-card.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.testimonial-content {
    background: #f8f9fa;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 15px;
    position: relative;
}
.testimonial-content p {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    font-style: italic;
    margin: 0;
}
.testimonial-content::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 40px;
    width: 16px;
    height: 16px;
    background: #f8f9fa;
    transform: rotate(45deg);
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 20px;
}
.author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2980b9, #1a5276);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}
.author-info {
    text-align: left;
}
.author-info strong {
    display: block;
    font-size: 14px;
    color: #2c3e50;
}
.author-info span {
    font-size: 12px;
    color: #888;
}
.testimonial-dots {
    margin-top: 15px;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    display: inline-block;
    margin: 0 4px;
    cursor: pointer;
    transition: background 0.3s;
}
.dot.active {
    background: #2980b9;
}

@media (max-width: 768px) {
    .trust-badges { gap: 15px; }
    .trust-item { font-size: 11px; }
    .stats-container { gap: 25px; }
    .stat-number { font-size: 28px; }
}

/* === Giảm khoảng trống banner và layout === */
.page-banner {
    height: 180px !important;
    min-height: unset !important;
}
.page-banner .section-title {
    font-size: 24px !important;
    margin-top: 0 !important;
}
.page-content-container .page-content {
    margin-top: -40px !important;
    margin-bottom: 30px !important;
}
.land-detail-content-top {
    margin-bottom: 15px !important;
}
.land-detail-content-top .right-content {
    padding-bottom: 20px !important;
}
@media (max-width: 767px) {
    .page-banner {
        height: 120px !important;
    }
    .page-banner .section-title {
        font-size: 18px !important;
    }
}

/* === Fix carousel height + khoảng trống === */
.land-detail-content-top .carousel {
    height: auto !important;
}
.land-detail-content-top .main-land-image {
    max-height: 400px !important;
    margin-bottom: 5px !important;
}
.land-detail-content-top .main-land-image img {
    max-height: 400px !important;
    object-fit: cover;
    width: 100%;
}
.land-detail-content-top.full-width {
    margin-bottom: 10px !important;
}
.land-detail-content-top.full-width .carousel {
    height: auto !important;
}
.land-detail-content-top.full-width .main-land-image {
    max-height: 400px !important;
}
.page-banner {
    height: 140px !important;
}
.land-detail-content {
    padding-top: 10px !important;
}
@media (max-width: 767px) {
    .land-detail-content-top .main-land-image,
    .land-detail-content-top .main-land-image img {
        max-height: 250px !important;
    }
}

/* === Collapsible TOC === */
.project-catalog .box-container {
    max-height: 220px !important;
    overflow: hidden !important;
    transition: max-height 0.4s ease !important;
    position: relative !important;
}
.project-catalog .box-container.toc-expanded {
    max-height: 2000px !important;
}
.project-catalog .box-container:not(.toc-expanded)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
}
.toc-toggle-btn {
    display: block;
    width: 100%;
    padding: 8px;
    background: #f0f7ff;
    border: 1px solid #d0e3f7;
    border-top: none;
    color: #2980b9;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
}
.toc-toggle-btn:hover {
    background: #dceefb;
}

/* === Collapsible TOC === */
.project-catalog .box-container {
    max-height: 220px !important;
    overflow: hidden !important;
    transition: max-height 0.4s ease !important;
    position: relative !important;
}
.project-catalog .box-container.toc-expanded {
    max-height: 2000px !important;
}
.project-catalog .box-container:not(.toc-expanded)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(transparent, #fff);
    pointer-events: none;
}
.toc-toggle-btn {
    display: block;
    width: 100%;
    padding: 8px;
    background: #f0f7ff;
    border: 1px solid #d0e3f7;
    border-top: none;
    color: #2980b9;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
}
.toc-toggle-btn:hover {
    background: #dceefb;
}

/* === MOBILE: always hide header-top to prevent layout shift === */
@media (max-width: 991px) {
    .header-top {
        display: none !important;
    }
    .header {
        position: sticky;
        top: 0;
    }
}
