* {
    box-sizing: border-box;
    margin: 0px;
    padding: 0px;
}

*:focus {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}

* {
    -webkit-tap-highlight-color: transparent;
}

*:focus:not(:focus-visible) {
    outline: none;
}

body {
    min-height: 100vh;
    font-family: "Josefin Sans", serif;
    position: relative;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.header-site {
    padding: 20px 30px;
    background-color: rgb(255, 255, 255);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0px;
    z-index: 4;
}

.header-site p {
    display: block;
    cursor: pointer;
}

.header-site a {
    text-decoration: none;
    color: rgb(0, 0, 0);
}

.logo {
    font-family: "Pacifico", serif;
    font-weight: 400;
    font-size: 1.7em;
    font-style: normal;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: rgb(0, 0, 0);
    z-index: 1001;
}

.hamburger-btn span {
    font-size: 1.5em;
    transition: transform 0.3s ease;
}

.hamburger-btn.open span {
    transform: rotate(90deg);
}

.navigation-bar {
    display: flex;
    align-items: center;
    justify-content: center;
}

.navigation-bar ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

.navigation-bar ul li a {
    text-decoration: none;
    color: rgb(0, 0, 0);
    cursor: pointer;
    font-size: 1em;
    transition: color 0.3s ease;
}

.navigation-bar ul li:hover a {
    color: rgba(255, 165, 0, 0.7);
    transition: 0.3s ease;
}

.navigation-bar ul li a.active {
    color: rgba(255, 165, 0, 0.7);
    font-weight: bold;
}

.footer-site {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-color: rgb(255, 255, 255);
    padding: 20px;
}

.footer-site p {
    font-size: 1.1em;
    width: fit-content;
    margin: 0px auto;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 12px;
}

.social-icon {
    filter: invert(0);
    transition: transform 0.2s ease;
}

.social-icon:hover {
    transform: scale(1.2);
}

.cover-image-wrap img {
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
    object-fit: cover;
}

.cover-image-wrap:hover img {
    transform: scale(1.1);
}

.cover-image-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 165, 0, 0);
    transition: background-color 0.5s ease;
    z-index: 1;
}

.cover-image-wrap:hover::after {
    background-color: rgba(255, 165, 0, 0.7);
}

.cover-content-container {
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 20px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.cover-image-wrap:hover .cover-content-container {
    opacity: 1;
}

.cover-image-wrap {
    flex: 1 1 calc(50% - 10px);
    max-width: calc(50% - 10px);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.site-container .projects-cover {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 50px auto 50px;
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 50%;
    /* font-size: 24px; */
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: #333;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.scroll-to-top:active {
    transform: translateY(2px);
}

.scroll-icon {
  width: 24px;
  height: 24px;
  filter: invert(1); /* Đảm bảo icon hiển thị màu trắng trên nền tối */
  pointer-events: none;
}

/* Responsive design with hamburger menu */
@media (max-width: 768px) {
    .hamburger-btn {
        margin-right: 20px;
        position: relative;
        width: 30px;
        height: 20px;
        display: block;
    }

    .hamburger-icon-line {
        position: absolute;
        width: 100%;
        height: 3px;
        background-color: rgb(0, 0, 0);
        transition: transform 0.2s ease, top 0.2s ease 0.2s; /* Giảm từ 0.3s xuống 0.2s */
    }

    .hamburger-icon-line:nth-child(1) {
        top: 0;
    }

    .hamburger-icon-line:nth-child(2) {
        top: 50%;
        transform: translateY(-50%);
    }

    .hamburger-btn.open .hamburger-icon-line:nth-child(1) {
        top: 50%;
        transform: translateY(-50%) rotate(45deg);
        transition: top 0.2s ease, transform 0.2s ease 0.2s; /* Giảm từ 0.3s xuống 0.2s */
    }

    .hamburger-btn.open .hamburger-icon-line:nth-child(2) {
        top: 50%;
        transform: translateY(-50%) rotate(-45deg);
        transition: top 0.2s ease, transform 0.2s ease 0.2s; /* Giảm từ 0.3s xuống 0.2s */
    }

    .navigation-bar {
        position: fixed;
        top: 0;
        right: 0;
        width: 250px;
        height: 100vh;
        background-color: rgb(255, 255, 255);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 10px 20px;
        transform: translateX(100%);
        transition: transform 0.2s ease; /* Giảm từ 0.3s xuống 0.2s */
        z-index: 1000;
    }

    .navigation-bar.open {
        transform: translateX(0);
    }

    .navigation-bar ul {
        flex-direction: column;
        gap: 40px;
        align-items: flex-start;
        width: 100%;
        padding-top: 50px;
        margin: 0;
    }

    .navigation-bar ul li {
        width: 100%;
    }

    .navigation-bar ul li a {
        font-size: 1.2em;
        display: block;
    }

    .header-site {
        padding: 20px;
    }

    .logo {
        font-size: 1.4em;
    }

    .cover-image-wrap {
        flex: 1 1 calc(100% - 10px);
        max-width: calc(100% - 10px);
    }

    .cover-content-container {
        font-size: 16px;
    }

    .scroll-to-top {
        width: 45px;
        height: 45px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .header-site {
        padding: 15px;
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }

    .logo {
        font-size: 1.5em;
    }

    .hamburger-btn span {
        font-size: 1.3em;
    }

    .navigation-bar {
        width: 200px;
    }

    .navigation-bar ul li a {
        font-size: 1em;
    }

    .footer-site {
        padding: 20px;
    }

    .footer-site p {
        font-size: 0.9em;
    }

    .cover-content-container {
        font-size: 14px;
    }

    .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: 18px;
        bottom: 15px;
        right: 15px;
    }
}