/* Custom Styles for BamboLand */

:root {
    --primary-green: #116535;
    --dark-green: #146c3a;
    --light-green: #e9f5ee;
    --accent-orange: #ff5722;
    --secondary-orange: #ba4b00;
    --line-gray: #d6d6d6;
    --text-dark: #333;
    --text-muted: #666;
    --bg-light: #f8f9fa;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

/* OVERRIDES */
.btn-success {
    background-color: var(--dark-green);
    border-color: var(--dark-green);
}
.btn-success:hover {
    background-color: #0e4c29;
    border-color: #0e4c29;
}

/* NAVBAR */
#main-header {
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px);
    min-height: 64px;
    display: flex;
    align-items: center;
    transition: all var(--transition-speed);
}

.navbar {
    padding: 0px 15px;
    width: 100%;
}

.navbar-collapse {
    border-top: 1px solid var(--line-gray);
    padding-bottom: 20px;
}

.navbar-brand {
    padding: 5px !important;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 64px;
    width: auto;
}

.nav-link {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark) !important;
    padding: 0.5rem 1rem !important;
    margin: 0 2px;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    height: 100%;
    text-align: center;
}

.nav-link:hover {
    color: var(--primary-green) !important;
}

.nav-link.active {
    background-color: var(--primary-green) !important;
    color: white !important;
    border-radius: 4px;
}

/* DROPDOWN MENU */
.dropdown-menu {
    border-radius: 8px;
    padding: 10px 0;
    min-width: 180px;
    border-top: none;
}

.dropdown-item {
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.7rem 1.5rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.dropdown-item:hover {
    background-color: var(--primary-green);
    color: white;
}

.dropdown-toggle::after {
    vertical-align: middle;
    margin-left: 5px;
}

.hotline-btn {
    background-color: var(--secondary-orange);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    text-align: center;
    transition: background-color var(--transition-speed);
}

.hotline-btn:hover {
    background-color: #e64a19;
    color: white;
}

/* STICKY HEADER */
#main-header.scrolled {
    background-color: rgba(255, 255, 255, 0.8) !important; /* Slightly more opaque when scrolled */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* HERO SECTION */
#hero {
    height: 50vh;
    min-height: 330px;
    position: relative;
}

#hero .object-fit-cover {
    object-fit: cover;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.z-index-2{
    z-index: 2;
}

.search-box {
    max-width: 750px;
    background: rgba(0, 0, 0, 0.4);
    padding: 25px;
    border-radius: 4px;
    backdrop-filter: blur(5px);
}

.search-box .form-control {
    border-radius: 2px 0 0 2px;
    padding: 15px 25px;
    border: none;
    font-size: 1.1rem;
}

.search-box .btn-warning {
    border-radius: 0 2px 2px 0;
    padding: 0 30px;
    font-size: 1rem;
}

.btn-search {
    background-color: var(--primary-green);
    color: white;
    border-radius: 0 4px 4px 0;
    font-weight: 600;
}

.btn-search:hover {
    background-color: var(--dark-green);
    color: white;
}

/* ADVANCED SEARCH OVERLAY */
.advanced-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: none;
}

.advanced-search-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.advanced-search-container {
    width: 100%;
    max-width: 900px;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.advanced-search-overlay.active .advanced-search-container {
    transform: translateY(0);
}

.advanced-search-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    position: relative;
}

.close-advanced-search {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}

.close-advanced-search:hover {
    color: var(--primary-green);
}

.custom-select {
    height: 32px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 14px;
    color: var(--text-dark);
    background-color: white;
    padding: 0 30px 0px 15px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

.custom-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(26, 137, 74, 0.25);
    border-color: var(--primary-green);
}

.btn-search-advanced {
    background-color: var(--primary-green);
    color: white;
    padding: 10px 30px;
    border-radius: 6px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

.btn-search-advanced:hover {
    background-color: var(--dark-green);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    color: white;
}

/* SECTION TITLES */
.section-title {
    font-weight: 700;
    color: var(--primary-green);
    letter-spacing: 1px;
    font-size: 1.2rem;
}

.title-underline {
    width: 60px;
    height: 3px;
    background-color: var(--primary-green);
    margin-top: 10px;
}

/* PROJECT CARDS */
.project-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.contact-link {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color var(--transition-speed);
}

.project-img-wrapper {
    height: 200px;
    overflow: hidden;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.1);
}

.project-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
}
.project-title a{
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-speed);
}
.project-title a:hover{
    color: var(--primary-green);
}

.project-address {
    color: #d32f2f;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.project-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-green {
    background-color: var(--primary-green);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
}

.btn-green:hover {
    background-color: var(--dark-green);
    color: white;
}

.btn-outline-green {
    border-color: var(--primary-green);
    color: var(--primary-green);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
}

.btn-outline-green:hover {
    background-color: var(--primary-green);
    color: white;
}

/* FIELD CARDS */
.field-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    height: 250px;
}

/* Mirror Layer Effect */
.field-card::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.1) 60%, transparent 80%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.field-card:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.field-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.field-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: rgba(255, 87, 34, 0.85); /* Orange overlay */
    text-align: center;
    z-index: 2; /* Keep above mirror */
}

.field-overlay h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

/* NEWS SECTION */
.news-tab-btn {
    font-weight: 600;
    color: var(--text-muted);
    border: none !important;
    padding: 0.5rem 2rem;
    border-radius: 0 !important;
    text-transform: uppercase;
    margin: 0px;
    border-bottom: 1px solid var(--line-gray) !important;
}

.news-tab-btn.active {
    color: var(--secondary-orange) !important;
    background: transparent !important;
}

.news-img-wrapper {
    border-radius: 8px;
    overflow: hidden;
    height: 180px;
    position: relative;
}

.news-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.5s ease;
}

/* Shine Effect */
.news-img-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.4) 50%, 
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-25deg);
    transition: 0.7s;
    z-index: 1;
}

.news-card:hover .news-img-wrapper::before {
    left: 150%;
}

.news-card:hover .news-img-wrapper img {
    filter: brightness(1.1) contrast(1.1);
}

/* NEWS CATEGORIES */
.news-categories {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.news-categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.news-categories ul li a {
    color: #333;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.news-categories ul li a:hover,
.news-categories ul li a.active {
    color: var(--secondary-orange);
}

.news-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
    height: 2.8em; /* 1.4 * 2 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: var(--secondary-orange);
}

.news-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.news-excerpt {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid var(--secondary-orange);
}

.box-recruitment-form{
    padding: 15px;
    border: 1px solid var(--secondary-orange);
    position: sticky;
    top: 80px;
}
.box-recruitment-form .box-title{
    color: var(--primary-green);
    text-transform: uppercase;
    font-size: 1rem;
    border-bottom: 1px solid var(--primary-green);
    display: inline-block;
    padding-bottom: 5px;
    padding-right: 20px;
    margin-bottom: 20px;
}

.galleries{
    column-count: 2;
    column-gap: 15px;
}

.galleries .item{
    width: 100%;
    margin-bottom: 16px;
    break-inside: avoid;
}

.galleries .item a{
    display: block;
}

.galleries .item img{
    border-radius: 10px;
    border: 1px solid #ccc;
    transition: transform var(--transition-speed);
}

.gallery-item:hover {
    transform: scale(1.1);
    -moz-transform: scale(1.1);
    -ms-transform: scale(1.1);
    -o-transform: scale(1.1);
    -webkit-transform: scale(1.1);
}


.content-duan {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0px -10px;
}
.content-tongquan {
    box-sizing: border-box;
    border-top: 1px solid var(--background-color);
    padding: 10px 0px;
    color: rgb(0, 46, 166);
    font-family: Lato, sans-serif;
    font-size: 16px;
}
.contentItem {padding: 0px 10px;}
.contentItem2 {padding: 0px 10px;}
.contentItem3 {margin-bottom: 5px; padding: 0px 10px;}

.content-duan td, th {
  padding: 4px;
  border-style: dotted;
  border-width: 1px;
}
.contentItem-gia {}
.contentItem-gia p{
    text-align: center;
    text-decoration: underline;
}
.content-vitri {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.content-vitri-item {
    padding: 0px;
}

.content-lienhe {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.contentItem-lienhe {
    text-align: center;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 5px 0 rgba(0,0,0,.17);
    transition: all .3s ease;
}
.contentItem-lienhe p{

    text-align: center;
    font-size: 16px;
    line-height: 1.67;
    letter-spacing: .025em;
}
.contentItem-lienhe-icon {
  font-size: 60px;
  line-height: 1;
  color: #009548;
  padding: 25px;
}
.paginations .pagination {
    justify-content: center;
}
.page-title {
    color: var(--primary-green);
    font-weight: 700;
    border-bottom: 2px solid var(--primary-green);
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 20px;
    padding-right: 30px;
    text-transform: uppercase;
    font-size: 1.1rem;
}
.page-body a{
    text-decoration: none;
}
.page-body a:hover{
    text-decoration: underline;
}
.page-body img{
    max-width: 100% !important;
    height: auto !important;
}
#map_google{
    height: 500px;
}
#map_title{
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
}
#map_content span{
    display: inline-block;
    width: 65px;
    font-weight: bold;
}
.map-canvas iframe {
    width: 100%;
    height: 500px;
    border: 0;
    display: block;
}
@media (max-width: 768px) {
    .map-canvas iframe {
        height: 350px;
    }
}
.content-lienhe {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}
.contentItem-lienhe {
    text-align: center;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 5px 0 rgba(0, 0, 0, .17);
    transition: all .3s ease;
    padding: 0px 15px;
}
.partner-grid>*{
    margin-top: 0px !important;
}
.partner-grid .col-items{
    padding: 0px 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}
.partner-grid .col-item {
    flex: 0 0 auto;
    width: 14.285%;
    background: #fff;
    border: 1px solid #f3f3f3;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 90px;
    transition: all var(--transition-speed);
    cursor: pointer;
    overflow: hidden;
}
.partner-card:hover .partner-logo,
.col-item:hover .partner-logo {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all var(--transition-speed);
}
#landing-content .section:nth-child(even){
	background: #ececec;
}
#utilities-detail, #houses-detail{
    padding: 20px;
    background: var(--background-color);
    color: var(--text-color);
}

.footer {
    background-color: var(--primary-green);
    color: white;
}
.footer-title {
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}
.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: white;
}
.footer-info li {
    margin-bottom: 15px;
    font-size: 0.9rem;
}
.registration-form .form-control {
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
}
.sub-footer {
    background-color: #f4f4f4 !important;
}
.sub-footer-title {
    color: var(--secondary-orange);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 5px;
}
.sub-footer-underline {
    width: 30px;
    height: 2px;
    background-color: var(--secondary-orange);
    margin-bottom: 15px;
}
.sub-footer ul li {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
}
.sub-footer ul li a {
    color: #666;
    text-decoration: none;
    text-transform: uppercase;
}
.sub-footer ul li a:hover {
    color: var(--secondary-orange);
}
.copyright{
    padding: 10px 0px;;
}
.copyright a{
    color: var(--secondary-orange);
}
.copyright img{
    height: 30px;
}

/* ==================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ================================================== */

/* ----- MIN-WIDTH QUERIES (Desktop overrides) ----- */
@media (min-width: 371px) {
}
@media (min-width: 576px) {
}
@media (min-width: 768px) {
    .galleries{column-count: 3;}
}
@media (min-width: 992px) {
    .navbar-collapse {
        border-top: none;
        padding-bottom: 0px;
    }
    /* Open dropdown on hover */
    .dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}
@media (min-width: 1190px) {
    .galleries{column-count: 4;}
}

/* ----- MAX-WIDTH QUERIES (Mobile/Tablet overrides) ----- */

/* Extra large devices (large desktops, less than 1200px) */
@media (max-width: 1199px) {
    .partner-grid .col-item {
        width: 20%; /* 5 items per row */
    }
}

/* Large devices (desktops, less than 992px) */
@media (max-width: 991px) {
    #hero {
        height: 60vh;
    }
    .display-4 {
        font-size: 2.5rem;
    }
    .partner-grid .col-item {
        width: 25%; /* 4 items per row */
    }
}
/* NAVBAR MOBILE SUBMENU EXPANDED */
@media (max-width: 991.98px) {
    .navbar-collapse .dropdown-menu {
        display: block;
        position: static;
        float: none;
        background-color: transparent;
        border: none;
        box-shadow: none;
        padding-left: 1.5rem;
        margin: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-top: 0px;
    }
    
    .navbar-collapse .dropdown-toggle::after {
        display: none !important;
    }

    .navbar-collapse .dropdown-item {
        padding: 0.5rem 1rem !important;
        text-transform: none !important;
        font-size: 0.8rem !important;
        color: var(--text-muted) !important;
    }

    .navbar-collapse .dropdown-item:hover {
        background-color: var(--light-green) !important;
        color: var(--primary-green) !important;
    }
}

/* Medium devices (tablets, less than 768px) */
@media (max-width: 767px) {
    .hotline-btn {
        margin-top: 10px;
        display: block;
        text-align: center;
    }
    .partner-grid .col-item {
        width: 33.333%; /* 3 items per row */
    }
}

/* Small devices (landscape phones, less than 576px) */
@media (max-width: 575px) {
    .w-100-mobile {
        width: 100%;
    }
    .partner-grid .col-item {
        width: 50%; /* 2 items per row */
    }
}

/* Extra small devices (portrait phones, less than 321px) */
@media (max-width: 370px) {
    .hotline-btn {
        display: none;
    }
}

/* SEARCH AUTOCOMPLETE */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0 0 10px 10px;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(0,0,0,0.1);
    margin-top: 2px;
}

.autocomplete-item {
    padding: 12px 15px;
    text-decoration: none;
    color: var(--text-dark);
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: #f8f9fa;
    color: var(--primary-green);
}

.autocomplete-item img {
    width: 60px;
    height: 45px;
    object-fit: cover;
}

.autocomplete-item .item-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
}

.autocomplete-item .item-category {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Custom Scrollbar for Autocomplete */
.autocomplete-dropdown::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}
/* Alerts */
.alert { border-radius: 8px; font-weight: 500; border: none; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); }
.alert-success { background-color: var(--light-green); color: var(--dark-green); }
.alert-danger { background-color: #fee2e2; color: #991b1b; }

/* Notification Layer */
.notification-layer { position: fixed; top: 80px; right: 20px; z-index: 1060; width: 100%; max-width: 380px; pointer-events: none; }
.notification-layer .alert { pointer-events: auto; margin-bottom: 15px; border: none; box-shadow: 0 10px 30px rgba(0,0,0,0.15); backdrop-filter: blur(5px); background-color: rgba(255, 255, 255, 0.95); }
.notification-layer .alert-success { border-left: 5px solid var(--primary-green); color: var(--dark-green); }
.notification-layer .alert-danger { border-left: 5px solid #dc3545; color: #991b1b; }
