/* =================================================================
   THEME STYLES - Custom overrides for Flatsome theme
   Website: Xây Dựng Đăng Khôi
   ================================================================= */

:root {
    /* These are fallback values - actual values are set dynamically in app.blade.php */
    --primary-color: #8B4513;
    --primary-dark: #5D3A1A;
    --secondary-color: #C41E3A;
    --accent-color: #DAA520;
    --text-color: #333;
    --light-bg: #f4f4f4;
}

/* =========================================
   BASE LAYOUT - ROW & COL
   ========================================= */

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.row > .col {
    padding: 0 15px;
    box-sizing: border-box;
}

.col.small-12 { width: 100%; }
.col.small-6 { width: 50%; }
.col.medium-3 { width: 25%; }
.col.medium-4 { width: 33.333%; }
.col.medium-6 { width: 50%; }
.col.large-3 { width: 25%; }
.col.large-4 { width: 33.333%; }
.col.large-5 { width: 41.666%; }
.col.large-6 { width: 50%; }
.col.large-7 { width: 58.333%; }
.col.large-8 { width: 66.666%; }
.col.large-12 { width: 100%; }

@media (max-width: 991px) {
    .col.medium-3 { width: 50%; }
    .col.medium-4 { width: 50%; }
    .col.medium-6 { width: 100%; }
    .col.large-3 { width: 50%; }
    .col.large-4 { width: 50%; }
}

@media (max-width: 767px) {
    .col.small-6 { width: 100%; }
    .col.medium-3,
    .col.medium-4,
    .col.large-3,
    .col.large-4 { width: 100%; }
}

/* =========================================
   HEADER STYLES
   ========================================= */

.header-wrapper {
    background: #fff;
}

.header-main {
    padding: 10px 0;
}

#logo img {
    max-height: 80px;
    width: auto;
}

/* Header info boxes */
.icon-box.featured-box {
    display: flex;
    align-items: flex-start;
}

.icon-box.icon-box-left {
    flex-direction: row;
}

.icon-box-img {
    flex-shrink: 0;
    margin-right: 15px;
}

.icon-box-img img {
    border-radius: 50%;
}

.icon-box-text h3.tel {
    margin: 0 0 5px;
    font-size: 16px;
    font-weight: 700;
}

.icon-box-text p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #666;
}

/* Wide nav / Main navigation */
#wide-nav {
    background: var(--primary-color) !important;
}

#wide-nav .flex-row {
    flex-wrap: nowrap;
}

#wide-nav .flex-left {
    flex-grow: 1;
}

.header-bottom-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-bottom-nav > li {
    white-space: nowrap;
    flex-shrink: 0;
}

.header-bottom-nav > li > a {
    color: #fff !important;
    font-weight: 600;
    text-transform: uppercase;
    padding: 15px 22px;
    font-size: 14px;
    display: block;
    letter-spacing: 0.5px;
}

.header-bottom-nav > li > a:hover,
.header-bottom-nav > li.current-menu-item > a {
    background: rgba(255,255,255,0.1);
}

.header-bottom-nav > li > a:hover {
    color: var(--accent-color) !important;
}

.header-bottom-nav > li.active > a,
.header-bottom-nav > li.current-menu-item > a {
    border-bottom: 3px solid var(--accent-color);
    color: var(--accent-color) !important;
}

/* Override nav-size-large */
.nav.nav-size-large > li > a,
.header-bottom-nav.nav-size-large > li > a {
    padding: 15px 22px !important;
    font-size: 14px !important;
    letter-spacing: 0.5px;
}

.nav.nav-spacing-xlarge > li {
    margin: 0 !important;
}

/* Dropdown menu - Override flatsome defaults */
.header-bottom-nav .sub-menu.nav-dropdown,
.sub-menu.nav-dropdown {
    background: var(--primary-dark) !important;
    min-width: 220px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2) !important;
    border-radius: 0 !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    z-index: 9999 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px);
    transition: all 0.3s ease !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: none;
}

/* Show dropdown on hover */
.header-bottom-nav .menu-item-has-children:hover > .sub-menu.nav-dropdown,
.header-bottom-nav .has-dropdown:hover > .sub-menu.nav-dropdown,
.menu-item-has-children:hover > .sub-menu.nav-dropdown,
.has-dropdown:hover > .sub-menu.nav-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
    pointer-events: auto;
}

/* Dropdown icon styling */
.nav-top-link .fa-angle-down {
    margin-left: 5px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.menu-item-has-children:hover .fa-angle-down,
.has-dropdown:hover .fa-angle-down {
    transform: rotate(180deg);
}

/* Dropdown parent relative position */
.header-bottom-nav .menu-item-has-children,
.header-bottom-nav .has-dropdown,
.menu-item-has-children,
.has-dropdown {
    position: relative !important;
}

.sub-menu.nav-dropdown li {
    list-style: none !important;
}

.sub-menu.nav-dropdown a,
.sub-menu.nav-dropdown > li > a {
    padding: 12px 20px !important;
    color: #fff !important;
    display: block !important;
    text-decoration: none !important;
    white-space: nowrap;
    font-size: 14px !important;
    text-transform: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    transition: all 0.2s ease;
}

.sub-menu.nav-dropdown > li:last-child > a {
    border-bottom: none !important;
}

.sub-menu.nav-dropdown a:hover,
.sub-menu.nav-dropdown > li > a:hover {
    background: var(--accent-color) !important;
    color: #fff !important;
    padding-left: 25px !important;
}

/* =========================================
   MARQUEE / CHU CHAY SECTION
   ========================================= */

.chu-chay-section {
    background-color: var(--light-bg);
    padding: 8px 0;
}

.chu-chay-section marquee {
    color: var(--secondary-color);
    font-size: 14px;
    font-weight: 600;
}

/* =========================================
   SLIDER / BANNER SECTION
   ========================================= */

.slider-section {
    position: relative;
}

.banner-slider {
    width: 100%;
}

.banner-slider img {
    width: 100%;
    height: auto;
}

.slider-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Slider full width */
#slider-1999140850 {
    width: 100%;
}

#slider-1999140850 .slider {
    width: 100%;
}

#slider-1999140850 .flickity-viewport {
    height: auto !important;
}

#slider-1999140850 .img.has-hover {
    width: 100%;
}

/* =========================================
   SECTION STYLES
   ========================================= */

.section {
    padding: 40px 0;
}

.section-title-container {
    margin-bottom: 30px;
}

.section-title {
    position: relative;
}

.section-title-main {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
}

/* Background colors */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

/* =========================================
   POST CARD STYLES
   ========================================= */

.post-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.post-card-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-card-thumbnail img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 15px;
}

.post-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 10px;
}

.post-card-title a {
    color: #333;
}

.post-card-title a:hover {
    color: var(--primary-color);
}

.post-card-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.post-card-meta {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* =========================================
   ICON BOX IN SECTIONS
   ========================================= */

.icon-box.featured-box.icon-box-center {
    text-align: center;
}

.icon-box.featured-box.icon-box-center .icon-box-img {
    margin: 0 auto 15px;
}

/* =========================================
   FOOTER STYLES
   ========================================= */

.footer-section {
    background-color: var(--primary-color) !important;
    color: #fff;
    padding: 40px 0;
}

.footer-section h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
}

.footer-section a:hover {
    color: #fff;
}

/* Social icons */
.social-icons a.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    margin-right: 8px;
    transition: background 0.3s;
}

.social-icons a.icon:hover {
    background: rgba(255,255,255,0.4);
}

/* Copyright */
.absolute-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 15px 0;
    font-size: 14px;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

/* =========================================
   GRID SYSTEM OVERRIDES
   ========================================= */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    padding: 0 15px;
}

/* Column widths */
.large-12 { width: 100%; }
.large-9 { width: 75%; }
.large-8 { width: 66.6667%; }
.large-7 { width: 58.3333%; }
.large-6 { width: 50%; }
.large-5 { width: 41.6667%; }
.large-4 { width: 33.3333%; }
.large-3 { width: 25%; }

/* Medium breakpoint */
@media (max-width: 991px) {
    .medium-12 { width: 100%; }
    .medium-6 { width: 50%; }
    .medium-4 { width: 33.3333%; }
    .hide-for-medium { display: none !important; }
    .show-for-medium { display: block !important; }
}

/* Small breakpoint */
@media (max-width: 767px) {
    .small-12 { width: 100%; }
    .small-6 { width: 50%; }
}

/* =========================================
   FLEX UTILITIES
   ========================================= */

.flex-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-left {
    justify-content: flex-start;
}

.flex-right {
    justify-content: flex-end;
}

.flex-grow {
    flex-grow: 1;
}

/* =========================================
   BUTTON STYLES
   ========================================= */

.button {
    display: inline-block;
    padding: 12px 24px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.button.primary {
    background: var(--primary-color);
    color: #fff;
}

.button.primary:hover {
    background: var(--accent-color);
}

.button.secondary {
    background: var(--secondary-color);
    color: #fff;
}

.button.secondary:hover {
    background: var(--secondary-color);
    filter: brightness(0.8);
}

.button.accent {
    background: var(--accent-color);
    color: #333;
}

.button.accent:hover {
    background: var(--accent-color);
    filter: brightness(0.85);
}

.button.is-outline {
    background: transparent;
    border: 2px solid currentColor;
}

.button.circle {
    border-radius: 50%;
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */

body {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-color);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--secondary-color);
}

/* =========================================
   SIDEBAR STYLES
   ========================================= */

.sidebar-item {
    margin-bottom: 25px;
    background: #fff;
    padding: 20px;
    border-radius: 4px;
}

.sidebar-item-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    color: #333;
    display: block;
}

.sidebar-list a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* =========================================
   FORM STYLES
   ========================================= */

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* =========================================
   UTILITY CLASSES
   ========================================= */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.pt-0 { padding-top: 0; }
.pb-0 { padding-bottom: 0; }

.hidden { display: none; }
.visible { display: block; }

/* =========================================
   PAGE HEADER
   ========================================= */

.page-header {
    background: var(--primary-color);
    padding: 30px 0;
    color: #fff;
}

.page-header-title {
    font-size: 28px;
    margin: 0;
}

.breadcrumb {
    margin: 10px 0 0;
    font-size: 14px;
}

.breadcrumb a {
    color: rgba(255,255,255,0.8);
}

.breadcrumb a:hover {
    color: #fff;
}

/* =========================================
   RESPONSIVE FIXES
   ========================================= */

@media (max-width: 991px) {
    .header-main .icon-box-text {
        display: none;
    }

    #wide-nav {
        display: none;
    }

    .footer-section .col {
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .section {
        padding: 25px 0;
    }

    .section-title-main {
        font-size: 20px;
    }
}

/* =========================================
   ICON BOX WITH BACKGROUND (has-icon-bg)
   ========================================= */

.icon-box-img.has-icon-bg {
    position: relative;
    margin: 0 auto 15px;
    width: 115px;
}

.icon-box-img.has-icon-bg .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.icon-box-img.has-icon-bg .icon-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 115px;
    height: 115px;
    box-sizing: border-box;
    overflow: hidden;
    background: var(--primary-color);
    border: none;
    padding: 0;
}

.icon-box-img.has-icon-bg .icon-inner img {
    border-radius: 50%;
    width: 80%;
    height: 80%;
    object-fit: contain;
    background: var(--primary-color);
    padding: 10px;
    margin: 0 auto;
    display: block;
}

/* Tieu Chi Section - Bao Gia Section */
.tieu-chi-section {
    background-color: #eee;
}

.tieu-chi-section .icon-box {
    padding: 10px;
}

.tieu-chi-section .icon-box h3 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin: 15px 0 10px;
    color: #333;
}

.tieu-chi-section .bg_mota {
    background: var(--primary-color);
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 10px;
}

.tieu-chi-section .bg_mota p {
    color: #fff;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

/* =========================================
   SLIDER STYLES (Flickity)
   ========================================= */

.slider-wrapper .slider {
    width: 100%;
}

/* Flickity viewport */
.flickity-viewport {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
}

.flickity-slider {
    position: relative;
    left: 0;
    width: 100%;
}

.slider .img.has-hover {
    position: relative;
    width: 100%;
}

.slider .img-inner {
    position: relative;
}

.slider .img-inner.dark {
    background: #000;
}

.slider .img-inner img {
    width: 100%;
    height: auto;
    display: block;
}

/* Flickity navigation */
.flickity-button {
    position: absolute;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
}

.flickity-button:hover {
    background: var(--primary-color);
}

.flickity-button:focus {
    outline: none;
    box-shadow: none;
}

.flickity-prev-next-button {
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}

.flickity-prev-next-button.previous {
    left: 10px;
}

.flickity-prev-next-button.next {
    right: 10px;
}

/* Flickity button icon SVG - CRITICAL FIX */
.flickity-button-icon {
    width: 40% !important;
    height: 40% !important;
    max-width: 20px;
    max-height: 20px;
    fill: #fff;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.flickity-button svg {
    width: 40% !important;
    height: 40% !important;
    max-width: 20px;
    max-height: 20px;
    fill: #fff;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.flickity-button svg path,
.flickity-button svg path.arrow {
    fill: #fff;
}

/* CRITICAL: Contain SVG within flickity button */
.flickity-button {
    overflow: hidden;
    position: absolute;
}

svg.flickity-button-icon {
    width: 40% !important;
    height: 40% !important;
    max-width: 20px;
    max-height: 20px;
    fill: #fff !important;
}

.flickity-page-dots {
    bottom: 20px;
    position: absolute;
    width: 100%;
    text-align: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

.flickity-page-dots .dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
}

.flickity-page-dots .dot.is-selected {
    background: #fff;
}

/* =========================================
   LOADING SPINNER
   ========================================= */

.loading-spin {
    display: none;
}

.loading-spin.centered {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* =========================================
   ROW SMALL STYLES
   ========================================= */

.row.row-small {
    margin: 0 -8px;
}

.row.row-small > .col {
    padding: 0 8px;
}

/* =========================================
   IS-DIVIDER
   ========================================= */

.is-divider {
    height: 3px;
    background: var(--primary-color);
    width: 30px;
    margin: 15px auto;
}

/* =========================================
   BOX STYLES
   ========================================= */

.box.has-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.box-overlay {
    position: relative;
    overflow: hidden;
}

.box-overlay .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.box-overlay .box-text {
    position: relative;
    z-index: 2;
}

/* =========================================
   ACTIVE MENU STATES
   ========================================= */

.menu-item.active > a,
.menu-item.current-menu-item > a {
    background: rgba(255,255,255,0.15);
}

/* =========================================
   LIST POST STYLES
   ========================================= */

.list-post {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.list-post > .col,
.list-post > .post-item {
    padding: 0 10px;
    margin-bottom: 20px;
}

.list-post .box-blog-post {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.list-post .box-blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.list-post .box-image {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.list-post .box-image .image-cover,
.list-post .box-image .image-overlay-add {
    display: block;
    width: 100%;
    height: 0;
    padding-top: 100%;
    position: relative;
    overflow: hidden;
}

.list-post .box-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.list-post .box:hover .box-image img,
.list-post .box-blog-post:hover .box-image img {
    transform: scale(1.05);
}

.list-post .box-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.list-post .post-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px;
    color: #333;
}

.list-post .is-divider {
    height: 3px;
    width: 30px;
    background: var(--primary-color);
    margin: 8px 0;
}

.list-post .from_the_blog_excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* =========================================
   IMAGE OVERLAY & ZOOM STYLES
   ========================================= */

.image-overlay-add {
    position: relative;
}

.image-overlay-add::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-overlay-add:hover::after {
    opacity: 1;
}

.image-zoom img {
    transition: transform 0.3s ease;
}

.image-zoom:hover img {
    transform: scale(1.05);
}

.image-cover {
    position: relative;
    overflow: hidden;
    display: block;
    width: 100%;
}

.image-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image Overlay Add - for posts */
.image-overlay-add {
    position: relative;
    display: block;
    overflow: hidden;
    width: 100%;
}

.image-overlay-add img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Padding-top aspect ratio containers */
.image-cover[style*="padding-top"],
.image-overlay-add[style*="padding-top"] {
    height: 0;
}

/* =========================================
   BOX OVERLAY DARK (For Cong Trinh Tieu Bieu Slider)
   ========================================= */

.box-overlay.dark .box-text {
    color: #fff;
}

.box-overlay.dark .post-title {
    color: #fff;
}

.box-overlay.dark .from_the_blog_excerpt {
    color: rgba(255,255,255,0.9);
}

.box-text-middle .box-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    padding: 20px;
    text-align: center;
}

/* =========================================
   POST TITLE STYLES
   ========================================= */

.post-title.is-large {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.post-title a {
    color: inherit;
    text-decoration: none;
}

.post-title a:hover {
    color: var(--primary-color);
}

/* =========================================
   BLOG POST EXCERPT
   ========================================= */

.from_the_blog_excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* =========================================
   LARGE COLUMNS GRID
   ========================================= */

.large-columns-4 > .col,
.large-columns-4 > .post-item {
    width: 25% !important;
}

.large-columns-3 > .col,
.large-columns-3 > .post-item {
    width: 33.333% !important;
}

.medium-columns-2 > .col,
.medium-columns-2 > .post-item {
    width: 50%;
}

.small-columns-1 > .col,
.small-columns-1 > .post-item {
    width: 100%;
}

@media (max-width: 991px) {
    .large-columns-4 > .col,
    .large-columns-4 > .post-item,
    .large-columns-3 > .col,
    .large-columns-3 > .post-item {
        width: 50% !important;
    }
}

@media (max-width: 767px) {
    .large-columns-4 > .col,
    .large-columns-4 > .post-item,
    .large-columns-3 > .col,
    .large-columns-3 > .post-item,
    .medium-columns-2 > .col,
    .medium-columns-2 > .post-item {
        width: 100% !important;
    }
}

/* =========================================
   BOX NORMAL STYLES
   ========================================= */

.box-normal {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.box-normal:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-bottom: 3px solid var(--secondary-color);
}

.box-text-bottom .box-text {
    padding: 15px;
}

.box-text-bottom .box-text .post-title a:hover,
.box-blog-post .box-text .post-title a:hover {
    color: var(--secondary-color);
}

/* =========================================
   SECTION TITLE CENTER
   ========================================= */

.section-title-center {
    text-align: center;
}

.section-title-center .section-title-main {
    display: inline-block;
}

/* =========================================
   PAGE WRAPPER & CONTENT AREA (CRITICAL)
   ========================================= */

/* Page wrapper - full width container for all sections */
.page-wrapper,
.content-area {
    width: 100%;
}

/* Sections inside page-wrapper should be full-width */
.page-wrapper > .section,
.content-area > .section {
    width: 100%;
}

/* Section-content contains the container for centering */
.section-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* For full-width sections that need edge-to-edge background */
.section {
    position: relative;
    width: 100%;
}

/* Section background - full width */
.section-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.section-content.relative {
    position: relative;
    z-index: 1;
}

/* Fill class for backgrounds */
.fill {
    width: 100%;
}

.bg-fill {
    background-size: cover;
    background-position: center;
}

/* =========================================
   SLIDER SECTION - FULL WIDTH
   ========================================= */

.slider-section {
    padding: 0;
    width: 100%;
}

.slider-section .section-content {
    max-width: none;
    padding: 0;
}

/* =========================================
   TIEU CHI SECTION (Icon Boxes)
   ========================================= */

#section_823684012 {
    padding-top: 30px;
    padding-bottom: 30px;
    background-color: #eee;
}

/* =========================================
   DU AN SECTION
   ========================================= */

#section_1698330987 {
    padding-top: 30px;
    padding-bottom: 30px;
}

/* =========================================
   CAM KET SECTION
   ========================================= */

#section_1556817661 {
    padding-top: 30px;
    padding-bottom: 30px;
}

/* =========================================
   CONG TRINH TIEU BIEU SECTION
   ========================================= */

#section_1016632063 {
    padding-top: 30px;
    padding-bottom: 30px;
}

/* =========================================
   BAI VIET MOI SECTION
   ========================================= */

#section_768571972 {
    padding-top: 30px;
    padding-bottom: 30px;
}

/* =========================================
   HEADER STYLES FIX
   ========================================= */

.header-wrapper {
    width: 100%;
}

.header-main .container,
.header-inner.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.header-bottom .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* =========================================
   FOOTER SECTION FIX
   ========================================= */

.footer-section .section-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.absolute-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* =========================================
   DARK SECTION TEXT COLOR
   ========================================= */

.section.dark,
.section.dark h1,
.section.dark h2,
.section.dark h3,
.section.dark h4,
.section.dark h5,
.section.dark h6,
.section.dark p {
    color: #fff;
}

/* =========================================
   ADDITIONAL LAYOUT FIXES
   ========================================= */

/* Row inside section-content */
.section-content > .row {
    margin: 0 -15px;
}

.section-content > .row.row-small {
    margin: 0 -8px;
}

/* Ensure proper box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Container class */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Clearfix for floats */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Pull classes */
.pull-left {
    float: left;
}

.pull-right {
    float: right;
}

/* Inline block */
.inline-block {
    display: inline-block;
}

/* =========================================
   WRAPPER & MAIN LAYOUT
   ========================================= */

#wrapper {
    width: 100%;
    overflow-x: hidden; /* Chỉ ẩn overflow ngang, giữ sticky hoạt động */
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#main {
    width: 100%;
    flex: 1;
}

html {
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

body {
    width: 100%;
    min-height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}

#wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Skip link - ensure it doesn't affect layout */
.skip-link,
.screen-reader-text {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
}

/* Ensure elements outside #wrapper don't affect layout */
body > .skip-link,
body > #main-menu,
body > #mobile-menu-overlay {
    position: fixed !important;
}

/* Reset all potential margins from flatsome framework */
#header,
header,
.header-wrapper,
.header-block,
.header-block.html-after-header,
#main,
#content,
#footer,
footer,
.footer-wrapper {
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Ensure header and footer have no gaps */
#header {
    position: relative;
}

.header-wrapper {
    background: #fff;
}

/* Ensure no gap between header-block (marquee) and main content */
.header-block.html-after-header {
    margin: 0 !important;
    padding: 0 !important;
}

/* Fix for single/detail pages - ensure proper background flow */
body.single #main,
body.single-policy #main,
body.single-post #main {
    padding-top: 0 !important;
}

/* =========================================
   RESPONSIVE IMPROVEMENTS
   ========================================= */

/* Mobile Menu Styles */
.mobile-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -300px !important;
    width: 280px !important;
    height: 100% !important;
    background: #fff !important;
    z-index: 999999 !important;
    transition: left 0.3s ease !important;
    overflow-y: auto !important;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.mobile-sidebar.mfp-hide {
    display: block !important;
    visibility: visible !important;
}

.mobile-sidebar.is-open {
    left: 0 !important;
}

/* Mobile Menu Close Button */
.mobile-menu-close {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 24px !important;
    height: 24px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100001 !important;
    transition: all 0.2s ease !important;
    font-size: 18px !important;
    color: #999 !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.mobile-sidebar.is-open .mobile-menu-close {
    display: flex !important;
}

.mobile-menu-close:hover {
    color: #333 !important;
    background: transparent !important;
}

.mobile-menu-close i {
    font-size: 18px !important;
    line-height: 1 !important;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.5) !important;
    z-index: 999998 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease !important;
}

.mobile-menu-overlay.is-open {
    opacity: 1 !important;
    visibility: visible !important;
}

.mobile-sidebar-wrap {
    padding: 70px 20px 20px 20px;
}

.mobile-sidebar .nav-sidebar {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-sidebar .nav-sidebar li {
    border-bottom: 1px solid #eee;
}

.mobile-sidebar .nav-sidebar li a {
    display: block;
    padding: 12px 0;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

.mobile-sidebar .nav-sidebar li a:hover,
.mobile-sidebar .nav-sidebar li.active a,
.mobile-sidebar .nav-sidebar li.current-menu-item a {
    color: var(--primary-color);
}

.mobile-sidebar .header-search-form {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.mobile-sidebar .searchform-wrapper {
    width: 100%;
}

.mobile-sidebar .searchform .flex-row {
    display: flex;
    gap: 8px;
}

.mobile-sidebar .searchform .flex-col.flex-grow {
    flex: 1;
}

.mobile-sidebar .search-field {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.mobile-sidebar .search-field:focus {
    border-color: var(--primary-color);
}

.mobile-sidebar .ux-search-submit {
    padding: 10px 15px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    transition: background 0.3s;
}

.mobile-sidebar .ux-search-submit:hover {
    background: var(--primary-dark);
}

.mobile-sidebar .ux-search-submit i {
    font-size: 16px;
}

/* Off Canvas Toggle Button */
.off-canvas-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.off-canvas-toggle:hover {
    background: rgba(139, 69, 19, 0.1);
}

.off-canvas-toggle svg {
    display: block;
}

/* Header Responsive */
@media (max-width: 991px) {
    .header-main .header-inner {
        padding: 10px 0;
    }

    #logo img {
        max-height: 60px;
    }

    .show-for-medium {
        display: flex !important;
    }

    .hide-for-medium {
        display: none !important;
    }

    .header-inner.flex-row {
        justify-content: space-between;
    }

    .mobile-nav.nav-right {
        margin-left: auto;
    }
}

@media (max-width: 767px) {
    #logo img {
        max-height: 50px;
    }

    .chu-chay-section marquee {
        font-size: 12px;
    }
}

/* Testimonials Section Responsive */
@media (max-width: 991px) {
    #section_1512757211 .col.medium-4 {
        width: 100%;
        margin-bottom: 20px;
    }

    #section_1512757211 .icon-box.icon-box-left {
        flex-direction: column;
        text-align: center;
    }

    #section_1512757211 .icon-box-img {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

@media (max-width: 767px) {
    #section_1512757211 {
        padding: 30px 0 !important;
    }

    #section_1512757211 .section-title-main {
        font-size: 20px !important;
    }

    #section_1512757211 .icon-box-text p {
        font-size: 14px;
    }

    #section_1512757211 .team-name {
        font-size: 14px;
    }
}

/* Hero Slider Responsive */
@media (max-width: 767px) {
    #slider-1350335108 .flickity-button {
        width: 36px;
        height: 36px;
    }

    #slider-1350335108 .flickity-button.previous {
        left: 10px;
    }

    #slider-1350335108 .flickity-button.next {
        right: 10px;
    }

    #slider-1350335108 .flickity-page-dots {
        bottom: 10px;
    }

    #slider-1350335108 .flickity-page-dots .dot {
        width: 8px;
        height: 8px;
    }
}

/* Icon Boxes Section Responsive */
@media (max-width: 767px) {
    #section_1226087953 {
        padding: 20px 0;
    }

    #section_1226087953 .col.small-6 {
        width: 50%;
    }

    #section_1226087953 .icon-box-text h3 {
        font-size: 12px !important;
    }

    #section_1226087953 .bg_mota p {
        font-size: 11px !important;
    }
}

@media (max-width: 480px) {
    #section_1226087953 .col.small-6 {
        width: 100%;
    }
}

/* Post Slider Section Responsive */
@media (max-width: 767px) {
    .post-slider-section {
        padding: 30px 0;
    }

    .section-title-main {
        font-size: 18px !important;
    }

    .slider-nav {
        gap: 8px;
        margin-top: 15px;
    }

    .slider-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .slider-dots .dot {
        width: 8px !important;
        height: 8px !important;
    }
}

/* Cong Trinh Section Responsive */
@media (max-width: 767px) {
    .cong-trinh-section {
        padding: 30px 0;
    }

    .cong-trinh-title {
        font-size: 14px;
        padding: 5px 8px;
    }

    .cong-trinh-excerpt {
        font-size: 12px;
    }

    .cong-trinh-nav {
        gap: 10px;
        margin-top: 15px;
    }

    .cong-trinh-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .cong-trinh-dots .dot {
        width: 8px;
        height: 8px;
    }
}

/* Footer Responsive */
@media (max-width: 767px) {
    .footer-grid {
        gap: 20px;
    }

    .footer-logo img {
        max-width: 150px;
    }

    .footer-title {
        font-size: 14px;
    }

    .footer-contact-list li {
        font-size: 13px;
    }

    .footer-copyright p {
        font-size: 12px;
    }
}

/* FAB Buttons Responsive */
@media (max-width: 767px) {
    .fab-container {
        right: 10px !important;
        bottom: 10px !important;
    }

    .fab-item {
        width: 45px !important;
        height: 45px !important;
    }
}

/* =================================================================
   FIX FLATSOME STICKY SIDEBAR
   Disable sticky sidebar behavior from Flatsome theme
   ================================================================= */

/* Disable all sticky behavior */
.is-sticky-column,
.sidebar-column.is-sticky,
.sticky-sidebar,
[data-sticky-column],
.col.is-stuck,
.sidebar.is-stuck {
    position: static !important;
    top: auto !important;
    transform: none !important;
    width: auto !important;
}

/* Override Flatsome's sticky JS effects */
.sidebar-inner.stuck,
.sidebar-inner.is-stuck,
.widget-area.stuck,
.widget-area.is-stuck {
    position: static !important;
    top: auto !important;
    transform: translateY(0) !important;
}

/* Ensure normal flow for all sidebar elements */
.sidebar,
.sidebar-inner,
.widget-area {
    position: relative !important;
    transform: none !important;
}

/* Remove any transition effects from sticky */
.sidebar-inner,
.widget-area {
    transition: none !important;
}

/* =================================================================
   STICKY NAVBAR ONLY
   Only the navbar (#wide-nav) sticks, header-main scrolls normally
   ================================================================= */

/* Navbar mặc định */
#wide-nav {
    z-index: 999;
}

/* Navbar khi fixed (scroll qua header-main) */
#wide-nav.is-fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* Navbar size */
.header-bottom {
    min-height: 38px;
}

.header-bottom-nav > li > a,
#wide-nav .nav > li > a {
    padding: 9px 18px;
}
