/*
  Template Name: MyPortfolio
  Template URL: https://bootstrapmade.com/myportfolio-bootstrap-portfolio-website-template/
  Author: BootstrapMade.com
  Author URL: https://bootstrapmade.com/
*/

/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/

body {
    font-family: "Inconsolata", monosapce;
    color: #0d1e2d;
}

a {
    color: #777;
}

a:hover {
    color: #000;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
    font-family: "Raleway", sans-serif;
}

.site-section {
    padding: 7rem 0;
}

.filters a {
    color: #000;
    display: inline-block;
    padding-left: 10px;
    padding-right: 10px;
    position: relative;
}

.filters a:hover,
.filters a:focus,
.filters a:active {
    text-decoration: none;
}

.filters a:hover:before {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 1px;
    background-color: #000;
}

.filters a.active {
    color: #000;
}

.filters a.active:before {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 1px;
    background-color: #000;
}

.item {
    border: none;
    margin-bottom: 30px;
}

.item .item-wrap {
    display: block;
    position: relative;
    overflow: hidden;
}

.item .item-wrap img {
    transition: .3s transform ease;
    -webkit-transform: scale(1);
    transform: scale(1);
}

.item .item-wrap > .work-info {
    position: absolute;
    top: 90%;
    width: 100%;
    height: 30%; /* Điều chỉnh chiều cao */
    text-align: center;
    z-index: 3;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    color: #fff;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6)); /* Gradient tối mờ */
    opacity: 0;
    visibility: hidden;
    margin-top: 20px;
    transition: .3s all ease;
}

/* Hiển thị thông tin khi hover */
.item-wrap:hover > .work-info {
    opacity: 1;
    visibility: visible;
}
.item .item-wrap:hover {
    text-decoration: none;
}

.item .item-wrap:hover img {
    -webkit-transform: scale(1.05);
    transform: scale(1.05);
}

.item .item-wrap:hover:after {
    opacity: 1;
    visibility: visible;
}

.item .item-wrap:hover .work-info {
    margin-top: 0px;
    opacity: 1;
    visibility: visible;
}
.col-lg-custom {
    flex: 0 0 20%;
    max-width: 20%;
}
.rounded-image {
    border-radius: 10px;
    overflow: hidden;
}

.testimonial-wrap {
    padding: 50px 50px 80px 50px;
    background: #eceff2;
}

.testimonial-wrap .testimonial {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.testimonial-wrap .testimonial img {
    border-radius: 50%;
    width: 120px;
    margin: 0 auto 30px auto;
}

.testimonial-wrap .testimonial blockquote p {
    font-size: 20px;
}

.h3 {
    font-size: 20px;
}

.h4 {
    font-size: 16px;
}

.heading {
    font-size: 28px;
}

.readmore {
    display: inline-block;
    border: 1px solid #000;
    padding: 10px 15px;
    font-size: 12px;
    text-transform: uppercase;
    color: #000;
    transition: .2s all ease;
    font-weight: 700;
}

.readmore:active,
.readmore:focus,
.readmore:hover {
    outline: none;
}

.readmore:hover {
    color: #fff;
    text-decoration: none;
    background: #000;
}

.testimonial-carousel .owl-dots {
    position: absolute;
    bottom: 40px;
    width: 100%;
    text-align: center;
}

.testimonial-carousel .owl-dots .owl-dot {
    display: inline-block;
}

.testimonial-carousel .owl-dots .owl-dot > span {
    display: inline-block;
    width: 7px;
    height: 7px;
    background-color: #cbd3da;
    border-radius: 50%;
    margin: 5px;
}

.testimonial-carousel .owl-dots .owl-dot.active {
    outline: none;
}

.testimonial-carousel .owl-dots .owl-dot.active > span {
    background: #0d1e2d;
}

.sticky-content {
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    /* required */
}

.list-line li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 30px;
}

.list-line li:before {
    content: "";
    position: absolute;
    left: 0;
    top: .7rem;
    width: 10px;
    height: 2px;
    background: #000;
}

.form-control {
    border-radius: 0;
    background: #f8f9fa;
    border: 1px solid transparent;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.form-control:active,
.form-control:focus {
    background: #eff1f4;
    outline: none;
    box-shadow: none;
    border: 1px solid transparent;
}

.custom-progress {
    height: 7px;
    border-radius: 0;
}

.custom-progress .progress-bar {
    background: #000;
}

/* Contact Form */

.php-email-form .validate {
    display: none;
    color: red;
    margin: 0 0 15px 0;
    font-weight: 400;
    font-size: 13px;
}

.php-email-form .error-message {
    display: none;
    color: #fff;
    background: #ed3c0d;
    text-align: center;
    padding: 15px;
    font-weight: 600;
}

.php-email-form .sent-message {
    display: none;
    color: #fff;
    background: #18d26e;
    text-align: center;
    padding: 15px;
    font-weight: 600;
}

.php-email-form .loading {
    display: none;
    background: #fff;
    text-align: center;
    padding: 15px;
}

.php-email-form .loading:before {
    content: "";
    display: inline-block;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    margin: 0 10px -6px 0;
    border: 3px solid #18d26e;
    border-top-color: #eee;
    -webkit-animation: animate-loading 1s linear infinite;
    animation: animate-loading 1s linear infinite;
}

@-webkit-keyframes animate-loading {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes animate-loading {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/

/* Custom Navmenu */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    border-bottom: 1px solid #e6e6e6;
    background-color: white;
    position: fixed;
    z-index: 10;
    width: 100%;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.logo {
    width: 50px;
    margin-right: 20px;
}

.nav-link {
    margin-right: 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
}

.nav-link.more {
    font-size: 22px;
}

.navbar-right {
    display: flex;
    align-items: center;
}

.search-bar {
    position: relative;
    display: inline-block;
    margin-right: 25px;
}
.navbar-brand{
    color: black;
}
.search-bar input {
    padding: 8px 40px 8px 10px;
    border-radius: 20px;
    border: 1px solid #ddd;
    width: 350px;
    background-color: #f6f6f6;
}

.search-bar .search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 16px;
}

.new-badge {
    background-color: black;
    color: limegreen;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 5px;
}

.icon-container {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.icon-container i {
    margin-left: 25px;

}

.upload-button {
    padding: 10px 20px;
    border: 2px solid black;
    border-radius: 30px;
    background-color: white;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
}

.upload-button:hover {
    background-color: #f6f6f6;
}
.nav-links {
    display: flex;
}

.nav-link {
    margin-right: 20px;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}
.close-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    margin-left: 10px;
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: nowrap;
    }
    .nav-links {
        display: none;
    }
    .search-bar input {
        width: 150px; /* Điều chỉnh kích thước ô search nhỏ hơn khi màn hình nhỏ */
    }

    .hamburger {
        display: block;
        margin-left: 20px;
        font-size: 24px;
    }
    .upload-button, .hamburger {
        margin-top: 10px;
    }

    .navbar-right {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .icon-container {
        display: flex;
        justify-content: center;
        width: 100%; /* Trải rộng toàn bộ chiều rộng */
        margin-top: 10px;
    }
}
.user-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    margin-top: 5px;
    border-radius: 15px;
}
.dropdown-content a,
.dropdown-content .nav-link {
    color: black;
    padding: 19px 25px;
    text-decoration: none;
    display: flex;
    align-items: center; /* Căn giữa icon và text */
}

.dropdown-content i {
    margin-left: -8px;
}

.dropdown-content a i,
.dropdown-content .nav-link i {
    margin-right: 12px;
}

.dropdown-content a:hover,
.dropdown-content .nav-link:hover {
    background-color: #f1f1f1;
}
/* Hiển thị dropdown khi active */
.show {
    display: block;
}

img.lazy-loading {
    opacity: 0.5; /* Làm mờ ảnh loading */
    transition: opacity 0.3s ease-in-out;
}

img.lazy-loaded {
    opacity: 1; /* Khi ảnh tải xong */
}
/*app bar*/
.app-bar {
    display: flex;
    justify-content: center;
    padding: 40px 0;
    position: fixed;
    top: 50px;
    width: 100%;
    background-color: #FFFFFF;
    z-index: 9;
    transition: box-shadow 0.3s;
}

.app-bar.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.app-bar-content {
    display: flex;
    font-size: 25px;
    line-height: 24px;
    margin-right: 340px;
}
#portfolio-grid {
    margin-top: 150px;
}
#portfolio-grid img{
    height: 170px;
    width: 250px;
}
#explore-grid {
    margin-top: 150px;
}
.app-bar-item {
    margin: 0 15px;
    cursor: pointer;
    color: #666;
    position: relative;
    transition: color 0.3s;
}

.app-bar-item::after {
    content: '';
    display: block;
    height: 4px;
    background-color: transparent;
    position: absolute;
    left: 0;
    right: 0;
    bottom: -15px; /* Đặt dưới mục */
    transition: background-color 0.3s;
}

.app-bar-item.active::after {
    background-color: #007bff;
}

.app-bar-item.selected {
    color: #000;
}

/*follow*/
.following-content {
    text-align: center;
    margin-top: 150px;
}

.following-users {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    padding: 0 10px;
}
.following-users h4 {
    text-align: center;
    margin-bottom: 10px;
    margin-top: 10px;
}
.user-card {
    flex-basis: calc(20% - 20px);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.user-card:hover {
    transform: translateY(-10px);
}

.card {
    position: relative;
    padding: 20px;
    width: 250px; /* Hoặc đặt min-width để không bị co lại */
    min-width: 250px;
    background-color: #fff;
    border-radius: 10px;
}

.background-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Luôn 2 cột */
    grid-template-rows: repeat(2, 1fr); /* Luôn 2 hàng */
    gap: 10px;
    width: 210px; /* Đảm bảo kích thước cố định */
    height: 200px;
}
.background-images img {
    width: 100%;
    height: 100px; /* Đảm bảo ảnh co dãn hợp lý */
    object-fit: cover;
    border-radius: 15px;
}
.background-images.one-image {
    display: flex;
}

.background-images.one-image img {
    width: 100%;
    height: 100%;
}
.bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}
.background-images.two-images {
    grid-template-columns: 1fr; /* Chỉ có 1 cột */
    height: 200px; /* Giữ nguyên chiều cao cố định */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
/* Nếu chỉ có 1 ảnh -> căn giữa, chiếm hết ô */
.background-images img:nth-child(1):nth-last-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

/* Nếu có 2 ảnh -> Căn giữa, mỗi ảnh chiếm 2 ô hàng */
.background-images img:nth-child(1):nth-last-child(2),
.background-images img:nth-child(2):nth-last-child(1) {
    grid-column: span 2;
    grid-row: span 1;
}

/* Nếu có 3 ảnh -> ảnh cuối cùng sẽ căn giữa */
.background-images img:nth-child(3):nth-last-child(1) {
    grid-column: span 2;
}
/* Trường hợp chỉ có 1 ảnh: Ảnh phải chiếm toàn bộ chiều rộng */
.background-images.one-image {
    display: block;  /* Sử dụng block thay vì flex */
    width: 100%;
    height: 200px;
}

.background-images.one-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

/* Trường hợp không có ảnh: Chỉ icon và text */
.background-images.no-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 200px;
    border-radius: 15px;
    background: #e0e0e0;
}

.background-images.no-image .content-unavailable {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.background-images.no-image i {
    font-size: 50px;
    color: #777;
    margin-bottom: 10px;
}

.background-images.no-image p {
    font-size: 16px;
    font-weight: 500;
    color: #555;
}


.profile-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;

    margin-top: -30px;
}

h4 {
    margin: 10px 0;
    font-size: 18px;
}

.btn-follow {
    background-color: rgb(8, 112, 209);
    border-color: rgb(8, 112, 209);
    color: rgb(255, 255, 255);
    border-radius: 28px;
    min-width: auto;
    margin: auto;
    padding: 12px 10px;
    width: 100px !important;
    max-height: unset !important;
}

button:hover {
    background-color: #0056b3;
}
@media (max-width: 768px) {
    .user-card {
        flex-basis: calc(50% - 20px);
    }
}

@media (max-width: 576px) {
    .user-card {
        flex-basis: 100%;
    }
}
/*explore*/
.popular-photos-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Cách đều trái phải */
    width: 100%;
    margin: 0 auto;
}

.item-explore {
    position: relative;
    width: 23%; /* Điều chỉnh để 4 ảnh vừa khít trong 1 dòng, trừ đi khoảng cách */
    margin-bottom: 20px; /* Khoảng cách dưới */
    padding: 0 10px; /* Khoảng cách trái phải */

}
.photo-wrapper {
    position: relative;
    width: 100%;
    height: 200px; /* Chiều cao cố định cho ảnh */
    overflow: hidden; /* Cắt bỏ phần tràn ra ngoài */
}
.item-explore .item-wrap {
    display: block;
    position: relative;
    overflow: hidden;
}

.item-explore .item-wrap:after {
    z-index: 2;
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* Nền tối */
    visibility: hidden;
    opacity: 0;
    transition: .3s all ease-in-out;
}

.item-explore .item-wrap img {
    transition: .3s transform ease;
    transform: scale(1);
}

.explore-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
    padding: 10px;
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.item-explore:hover .explore-info {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info2 {
    display: flex;
    align-items: center;
    flex-direction: row;
}

.user-image2, .user-name2, .icon-heart2, .icon-dots2 {
    pointer-events: auto;
}

.user-image2 {
    border-radius: 50%;
    margin-right: 10px;
}

.user-name2 {
    font-size: 18px;
    color: #fff;
    margin-right: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.icon-heart2, .icon-dots2 {
    flex-grow: 0;
    margin-left: 10px;
    font-size: 18px;
    margin-right: 10px;
    position: relative;
    color: #fff;
}

.icon-heart2:hover {
    cursor: pointer;
}

.icon-heart2 .fa-heart {
    color: #fff;
}

.icon-heart2 .fa-heart.liked {
    color: #ff5a5f;
}

.icon-dots2 {
    position: relative;
    display: inline-block;
}
.item-explore .item-wrap:hover {
    text-decoration: none;
}

.item-explore .item-wrap:hover img {
    transform: scale(1.05);
}

.item-explore .item-wrap:hover:after {
    opacity: 1;
    visibility: visible;
}

.item-explore .item-wrap:hover .work-info {
    margin-top: 0px;
    opacity: 1;
    visibility: visible;
}
.photo-header {
    width: 100%;
    margin-bottom: 20px;
    margin-left: 20px;
}

.photo-header h2 {
    font-size: 24px;
    margin: 0;
}

.photo-header p {
    font-size: 14px;
    color: #666;
    margin: 5px 0 0;
}
.img-thin {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    transition: transform 0.3s;
}

.item-explore:hover .img-thin {
    transform: scale(1.05);
}
.top-categories {
    width: 100%;
}
.top-categories h2{
    font-size: 24px;
    margin: 0;
}
.top-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.category-item {
    position: relative;
    flex: 1 1 calc(25% - 15px);
    overflow: hidden;
    border-radius: 8px;
}

.category-item img {
    width: 100%;
    height: 200px;
    transition: none;
}

.category-item:hover img {
    transform: scale(1.05);
}

.category-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    transition: background-color 0.2s;
}

.category-item:hover:before {
    background-color: rgba(0, 0, 0, 0.7);
}

.category-item span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
}

.follow-header{
    width: 100%;
    margin-bottom: 20px;
    margin-left: 20px;
}
.follow-header h2{
    font-size: 24px;
    margin: 0;
}
.profile-img {
    display: block;
    transform: translateY(-20px);
    margin: 0 auto;
}
.following-content-2 {
    margin: 20px 0;
}
.featured-galleries {
    width: 100%;
}

.galleries-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.gallery-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: calc(33.33% - 20px);
    padding: 10px;
    box-sizing: border-box;
}
.gallery-images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px;
}
.gallery-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 16px;
}

.image-count {
    max-width: 100%;
    width: fit-content;
    height: fit-content;
    display: flex;
    color: white;
    background-color: rgb(69, 69, 124);
    border-radius: 4px;
    -webkit-box-align: center;
    align-items: center;
    padding: 4px 8px;
    margin-left: 4px;
    word-break: break-word;
}

.image-count svg {
    font-size: 20px;
    margin-right: 5px;
}
.image-count span {
    color: whitesmoke;
}
.gallery-images img {
    width: 100%;
    height: 100px;
    border-radius: 8px;
    transition: transform 0.3s;
}
.featured-galleries {
    width: 100%;
}
.featured-galleries h2{
    font-size: 24px;
    margin: 0;
}
.top-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}
.gallery-images img:hover {
    transform: scale(1.05);
}
.gallery-footer {
    padding: 10px;
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.btn-favorite,
.btn-options {
    background: none;
    border: none;
    color: gray;
    cursor: pointer;
    font-size: 20px;
    margin-left: 10px;
}
.footer-buttons {
    margin-left: auto;
    display: flex;
}
.view-all {
    display: block;
    margin-bottom: 10px;
    text-align: center;
    color: blue;
    text-decoration: underline; /* Gạch chân */
}
/*footer*/
.footer {
    padding: 0 0 4rem 0;
}

.footer a {
    color: #000;
}

.social a {
    display: inline-block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f8f9fa;
    position: relative;
    text-align: center;
    color: #0d1e2d;
}

.social a span {
    display: inline-block;
    left: 50%;
    position: absolute;
    top: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.social a:hover {
    color: #000;
}

@media (max-width: 780px) {
    .custom-navbar > .container {
        padding-right: 0;
        padding-left: 0;
    }
}
