/* 
    # custom
    1. Nav Bar
    2. Category Menu
    3. Hero Section
    4. Nút điều hướng
    5. Dots
    6. Card Blog
*/

* {
    font-family: 'Inter', sans-serif;
    margin: 0;
    box-sizing: border-box;
}

body {
  padding-top: 80px;
}

/* custom */
.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
  box-sizing: border-box;
}

/* Nav Bar */
.nav-bar {   
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: auto;
  padding: 0px 20px 0px 22px;
  margin: 10px auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 50px;
  z-index: 1000;
  border: 1.5px solid #E0DBEF;
  background: linear-gradient(90deg, #fff 60%, #f6f7fb 100%);
  transition: background 0.3s, border-color 0.3s;
}

.icon-logo {
    width: 40px;
    height: 40px;
}

.menu-home , .menu-home div{
    display: flex;
    align-items: center;
    justify-content: center;
}
.menu-home div {
    width: 200px;
}
.menu-home div a{
    text-decoration: none; 
    color: rgb(3, 94, 155);
    margin-left: 10px;
}
.menu-home .menu-list {
    display: flex;
    list-style: none;
    align-items: center;
    justify-self: center;
    height: 100%;
}
.menu-list li {
    height: 100%;
    font-size: 20px;
    font-weight: 500;
    padding: 15px 20px;
}
.menu-list li a{
  position: relative;
    color: black;
    text-decoration: none;
}

.menu-list li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px; 
  background: #000;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.menu-list li a:hover::after {
  transform: scaleX(1);
}

.menu-list li:hover {
  background-color: rgb(252, 248, 248);
  border-radius: 20px;
}
.navbar-menu-right {
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.menu-search {
  position: relative;

}
.menu-search .search-top{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
}
.menu-search .search-top:hover {
  background-color: rgb(243, 239, 239);
  border-radius: 20px;
  cursor: pointer;
  padding: 10px 15px;
}
.menu-search .icon-search {
  font-size: 30px;
}

.menu-search p {
  background-color: transparent;
  margin-left: 2px;
  font-size: 20px;
}

.search-popup {
  position: absolute;
  top: 110%;
  right: -5px;
  background: #fff;
  padding: 32px;
  border-radius: 24px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease-in-out;
  z-index: 999;
  display: none;
}
.search-popup form {
  display: flex;
  flex-direction: column;
}

.search-popup.show {
  display: block;
}

.search-tittle {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  color: #151515;
  margin-bottom: 10px;
  width: auto;
  
}

.search-box {
  display: flex;
  width: 500px;  
  column-gap: 12px;
  margin-top: 12px;
}

.search-box .search-field {
  border-radius: 20px;
  border: 1px solid #ddd;
  padding: 12px 20px;
  height: 46px;
  flex-grow: 1;
}

.search-box .btn-search-submit {
  border-radius: 20px;
  border: 1px solid #ddd;
  padding: 0 20px;
  text-align: left;
  cursor: pointer;
  color: #fff;
  background-color: #000;
}

.search-popup .popular-searches {
  margin-top: 30px;

}

.search-popup .popular-searches a{
  text-decoration: none;
  color: #000;
}

.nav-toggle, .nav-mobile-menu {
  display: none;
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  display: none;
  animation: fadeIn linear 0.2s;
}

#toggle-menu-check {
  display: none;
}

/* Category Menu */
.category-menu {
  display: flex;
  gap: 15px;
  flex-wrap: nowrap;
  justify-content: center;
  margin-top: 25px;

}

.category-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  background-color: #fff;
  width: 250px;
  height: 60px;
}

.category-item i {
  font-size: 18px;
}

.category-item:hover {
  border-color: #000;
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 2.5fr 0.02fr 1fr; 
  gap: 3px;
  align-items: center;
  height: auto;
  margin: 20px auto;
}

.hero-banner, .hero-spacer, .hero-info {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hero-banner { 
  position: relative;
  overflow: hidden;
  border: solid 1px #ddd;
  border-radius: 15px;
}

.hero-slider {
  display: flex;
  height: 100%;
  transition: transform 0.6s ease;
}

.slide {
  min-width: 100%;
  position: relative;
}

.hero-banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex: 0 0 100%;
}

.caption {
  position: absolute;
  bottom: 20%;
  right: 0;
  color: #fff;
  padding: 15px 20px;
  border-radius: 8px;
  max-width: 45%;
  text-align: right;
}

/* Nút điều hướng */
.btn-nav{
  position: absolute;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 26px;
  display: grid;
  place-items: center;
  user-select: none;
}

.prev {
  color: #fff;
  left: 42%;
}
.next {
  color: #fff;
  right: 42%;
}

.prev:hover, .next:hover {
  animation: zoomIn 0.4s ease forwards;
}

@keyframes zoomIn {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.5);
  }
}

/* Dots */
.dots {
  position: absolute;
  left: 50%;
  bottom: 33px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  margin: auto;
}
.dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.6s ease;
}
.dots button.active {
  width: 22px;         
  background: #fff;
}
.hero-spacer { 
  background: transparent; 
}
.hero-info { 
  display: flex;
  flex-direction: column;
  height: 100%;
}
.hero-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 50px;
  border: solid 1px #ddd;
  border-radius: 15px;
  height: 100%;
  flex-grow: 1;
}
.hero-intro .hero-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin: 30px 0;
}
.hero-intro h3 {
  font-size: 16px;
}

.hero-intro p {
  margin-top: 15px;
  color: #555;
  text-align: center;
}

.hero-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  flex-grow: 1;
  padding: 65px 40px;
  border: solid 1px #ddd;
  border-radius: 15px;
  margin-top: 15px;
}
.hero-social h3 {
  font-size: 18px;
  color: #333;
}
.social {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
}
.social a {
  font-size: 2.2rem;
  color: #333;
  transition: color 0.3s;
}

.social a:hover {
  color: #0073e6;
}
/* Card Blog */
.card-blog{
  display: flex;
  margin-top: 5px;
  flex-wrap: wrap;
}
.card-blog-section {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 8px 0;
}
.card-blog .card-item {
  height: auto;
  width: 400px;
  border: solid 1px #ddd;
  border-radius: 15px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  margin: 0 5px;
  justify-content: space-between;
  align-items: stretch;
  max-width: 100%;
  box-sizing: border-box;
}
.card-item-header {
  height: auto;
}

.card-item-header .card-item-content {
  flex-grow: 1;
}

.card-item-header .category-tag {
  border: solid 1px #ddd;
  border-radius: 35px;
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.card-item-header .category-tag a{
  text-decoration: none;
  width: 100%;
  color: #000;
  padding: 14px 16px;
  border-radius: 35px;
}

.card-item-header .category-tag a:hover{
  background-color: #000;
  color: #fff;
}

.card-item-header .item-title {
  margin-top: 25px;
  height: auto;
  text-align: left;
}

.card-item-header .item-title a {
  display: inline;
  position: relative;
  color: #000;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s cubic-bezier(.4,0,.2,1);
  line-height: 1.4;
  padding-bottom: 2px;
}

.card-item-header .item-title a:hover {
  background-size: 100% 2px;
}

.card-item-content {
  margin: 30px 0 0 0;
  align-items: stretch;
}

.card-item-content .post-image {
  width: 100%;
  height: 200px;
  border-radius: 15px;
}
.card-item-content .item-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}
.card-item-content .post-describe {
  margin-top: 20px;
  text-align: left;
  color: #555;
  height: 120px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 6; /* Số dòng tối đa muốn hiển thị */
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.card-item-content .post-item-meta {
  margin: 20px 0 0 0;
  padding: 20px 0 0 0;
  border-top: solid 1px #ddd;
  display: flex;
  justify-content: space-between;
}
.posted-date {
  font-size: 14px;
}
.posted-date span {
  color: #555;
}
.coment-count {
  color: #555;
}

.card_contact {
  margin: 30px auto;
  padding: 50px;
  height: auto;
  width: 100%;
  border: solid 1px #000;
  border-radius: 500px;
}

.card_contact_content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.content_top {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.content_decor {
  height: 26px;
  width: 26px;
}

.content_top .content_decor {
    margin-bottom: 50px;

}

.content_title {
  padding: 20px 0;
  border-top: solid 1px #000;
  border-bottom: solid 1px #000;
  text-align: center;
  width: auto;
}

.content_title h1 {
  font-size: 75px;
  font-weight: 500;

}

.content_describe {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 20px;
}

.content_describe span {
  font-size: 18px;
  font-weight: 400;
  overflow: hidden;  
}

.content_tag {
  text-align: center;
  height: auto;
  padding: 10px;
}

.content_tag a {
  display: inline-block;
  text-decoration: none;
  color: #000;
  padding: 10px 20px;
  border-radius: 20px;
  border: solid 1px #ddd;
  margin: 0 5px;
  transition: all 0.2s ease-in-out;

}

.content_tag a:first-child {
  background-color: #f6fe6c;
}
.content_tag a:last-child {
  background-color: #8DFFA6;
}
.content_tag a:nth-child(2) {
  background-color: #7DB1FF;
}
.content_tag a:nth-child(3) {
  background-color: #FF9AAC;
}

.content_tag a:hover {
  box-shadow: 0 8px 8px rgba(0,0,0,0.2);
  transform: translateY(-2px);
  border-color: transparent;
}

.content_bottom {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.content_bottom .content_decor {
    margin-top: 50px;
}

.footer {
  padding: 20px;
  font-family: sans-serif;
}

.footer-top {
  text-align: center;
  border-top: 1px solid #ddd;
  margin-bottom: 50px;

}

.footer-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  place-items: center;
  gap: 40px;
  margin: auto;  
}

.footer-logo {
  font-size: 24px;
  margin-bottom: 15px;
}
.footer-about , .footer-links {
  text-align: center;
}

.footer-about p {
  color: #555;
  line-height: 1.6;
}
.footer-links {
  height: 240px;
}

.footer-links h3,
.footer-contact h3 {
  margin-bottom: 15px;
  font-size: 18px;
}

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

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul li a {
  position: relative;
  text-decoration: none;
  transition: color 0.3s;
  font-size: 20px;
  font-weight: 500;
  color: #555;
  padding-bottom: 5px;
}

.footer-links ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #000;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.footer-links ul li a:hover {
  color: #000; 
  font-size: 22px;
}

.footer-links ul li a:hover::after {
  transform: scaleX(1);
}

.footer-contact p {
  margin: 8px 0;
}

.footer-socials {
  margin-top: 15px;
}

.footer-socials a {
  display: inline-block;
  margin-right: 10px;
  font-size: 25px;
  transition: color 0.3s;
  padding: 0 5px;
  color: #000;
}

.footer-socials a:hover {
  color: #1da1f2;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #ddd;
  margin-top: 40px;
  padding-top: 15px;
  font-size: 14px;
}

/* --- Responsive --- */

/* Tablet: <= 1024px */
@media (max-width: 1024px) {
  .container {
    max-width: 98vw;
    padding: 0 8px;
  }
  .nav-bar {
    height: auto;
    gap: 10px;
  }
  .menu-home .menu-list {
    display: none;
  }

  .nav-toggle {
    display: block;
    position: relative;
    padding: 10px 30px;
    margin-left: 15px;
  }

  .toggle-icon {
    font-size: 30px;
    cursor: pointer;
  }
  #toggle-menu-check:checked ~ .nav-overlay {
    display: block;
  }
  #toggle-menu-check:checked ~ .nav-mobile-menu {
    display: block;
    transform: translateX(0);
    opacity: 1;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .nav-mobile-menu {
    position: fixed;
    display: block;
    top: 0;
    right: 0;
    bottom: 0;
    width: 340px;
    background: #fff;
    padding: 25px 30px;
    border-top-left-radius: 24px;
    border-bottom-left-radius: 24px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: all linear 0.2s ;
    opacity: 0;
  }

  .nav-mobile-top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
  }
  .nav-mobile-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
  }
  .nav-mobile-logo a{
    text-decoration: none; 
    color: rgb(3, 94, 155);
  }
  .close-icon {
    font-size: 35px;
    cursor: pointer;
    padding: 0 15px;
  }
  .nav-mobile-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    height: auto;
  }

  .nav-mobile-list li {
    width: 100%;
    border: solid 1px #ddd;
    border-radius: 20px;
    text-align: center;
    margin: 10px;
  }

  .nav-mobile-list li a {
    display: block;
    width: 100%;
    text-decoration: none;
    box-sizing: border-box;
    color: #000;
    font-size: 20px;
    font-weight: 500;
    padding: 20px 0;
  }

  .category-menu {
    flex-wrap: wrap;
    gap: 20px;
  }
  .category-item {
    width: 45vw;
    min-width: 180px;
    max-width: 270px;
    font-size: 15px;
    height: 50px;
    padding: 10px 5%;
    justify-content: left;
  }

  .card-item-header .item-title {
    height: auto;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero-banner,
  .hero-info {
    width: 100%;
    padding: 0;
  }
  .hero-intro,
  .hero-social {
    padding: 30px 10px;
  }
  .card-blog {
    flex-direction: column;
    align-items: center;
  }
  .card-blog-section {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .card-blog .card-item {
    width: 90vw;
    min-width: 220px;
    max-width: 400px;
    padding: 25px;
    margin: 10px 10px;
  }
  .card-item-content .post-image {
    height: 270px;
  }
  .content_title h1 {
    font-size: 40px;
  }
  .card_contact {
    padding: 30px;
    border-radius: 100px;
    max-width: 97vw;
  }
  .footer-form {
    display: flex;
    flex-direction: column;
  }
  .footer-links {
    height: auto;
    margin: 5px 20px;
    width: 100%;
  }
  .footer-links ul{
   display: flex;
   gap: 10px;
   margin-top: 20px;
   align-items: center;
   justify-content: center;
   height: 50px;
   width: 100%;
  }
  .footer-links ul li {
    margin: 0;
    padding: 5px;
    width: 120px;
  }
  .footer-contact h3 , .footer-socials{
    text-align: center;
  }
}

/* Mobile: <= 768px */
@media (max-width: 768px) {
  .container {
   width: 93vw;
  }
  .nav-bar {
    height: auto;
    padding: 0 20px;
    margin: 5px auto;
  }
  .nav-toggle {
    padding: 0;
  }

  .menu-home {
    margin: 0 20px;
  }

  .icon-logo ~ a h2 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: auto;
  }

  .menu-home div {
    width: 120px;
  }
  .menu-home .menu-list {
    flex-direction: column;
    gap: 0;
    padding: 0;
  }
  .menu-list li {
    padding: 10px 8px;
    font-size: 17px;
  }

  .search-popup {
    width: 88vw;
    right: -65%;
  }

  .search-box {
    width: auto;
  }

  .toggle-icon {
    cursor: pointer;
  }

  .category-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    box-sizing: border-box;
    place-items: center;
    margin: 25px auto;
  }
  .category-item {
    font-size: 16px;
    height: 50px;
    padding: 0 12%;
    justify-content: left;
    align-items: center;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 10px auto;
  }
  .hero-banner,
  .hero-info {
    width: 100%;
    padding: 0;
  }
  .hero-intro,
  .hero-social {
    padding: 18px 4px;
    margin-top: 8px;
  }
  .hero-intro .hero-avatar {
    width: 90px;
    height: 90px;
    margin: 18px 0;
  }
  .caption {
    max-width: 100%;
    font-size: 15px;
    padding: 8px 8px;
    bottom: 11%;
  }
  .btn-nav {
    width: 36px;
    height: 36px;
    font-size: 18px;
    bottom: 10px;
  }
  .prev {
    left: 30%;
  }
  .next {
    right: 30%;
  }
  .dots {
    bottom: 20px;
    gap: 5px;
  }
  .card-blog {
    width: 95vw;
  }
  .card-blog .card-item {
    width: 98vw;
    min-width: 160px;
    max-width: 100%;
    padding: 12px;
  }
  .card-item-content .post-image {
    height: auto;
  }
  .card-item-content .post-describe {
    height: auto;
  }
  .content_title h1 {
    font-size: 22px;
  }
  .card_contact {
    padding: 10px;
    border-radius: 40px;
    width: 93vw;
  }
  .footer-form {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 4px;
  }
  .footer-logo {
    font-size: 18px;
  }
  .footer-links ul li a {
    font-size: 16px;  
  }
  .footer-contact h3, .footer-socials{
    text-align: center;
  }
  .footer-contact a{
    margin: 0 10px;
  }
}

/* Small mobile: <= 480px */
@media (max-width: 480px) {
  .container {
    padding: 0 2px;
    width: 100vw;
  }

  .nav-bar {
    flex-direction: row;
    padding: 0 15px;
    margin: 5px auto;
  }

  .menu-home div {
    width: auto;
  }

  .menu-list li {
    font-size: 15px;
    padding: 6px 4px;
  }

  .search-top p {
    display: none;
  }

  .search-popup {
    width: 97vw;
    top: 140%;
    right: -76px;

  }

  .search-box {
    width: 100%;
  }

  .nav-toggle{
    margin: 0 10px;
    padding: 0 8px;
  }

  .category-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    place-items: center;
    margin: 10px auto;
  }
  
  .category-item {
    font-size: 15px;
    height: 50px;
    padding-left: 22px;
    width: 95%;
    margin: 5px auto;
    justify-content: left;
    align-items: center;
  }

  .slide .caption {
    bottom: 12%;
    text-align: center;
    right: 0;
    width: 207px;
  }

  .hero-intro .hero-avatar {
    width: 160px;
    height: 160px;
    margin: 15px 0;
  }

  .hero-intro h3 {
    font-size: 23px;
  }
  .hero-intro h1 {
    font-size: 25px;
  }

  .caption {
    font-size: 12px;
    padding: 4px 4px;
    bottom: 5%;
  }
  .btn-nav {
    width: 28px;
    height: 28px;
    font-size: 13px;
    bottom: 3%;
  }

  .dots {
    bottom: 5%;
  }

  .card-blog .card-item {
    padding: 20px;
  }

  .card-item-content .post-image {
    height: 250px;
  }
 
  .card_contact {
    padding: 20px;
    border-radius: 50px;
  }

  .content_title {
    width: 100%;
  }

  .content_title h1 {
    font-size: 22px;
    font-weight: 800;
  }

  .content_describe {
    margin-top: 20px;
    margin-bottom: 10px;
  }

  .content_tag a {
    margin: 20px 10px;
    width: 65%;
    height: auto;
    padding: 15px 0;
  }

  .footer-logo {
    font-size: 24px;
  }

  .footer-links {
    margin: 20px auto;
  }

  .footer-links h3 , .footer-contact h3{
    font-size: 19px;
  }

  .footer-links ul{
    margin-top: 10px;
  }

  .footer-links ul li {
    width: auto;

  }

  .footer-links ul li a {
    font-size: 15px;
    font-weight: bold;
  }

  .footer-links ul li a:hover {
    color: #000;
    font-size: 15px;
  }

  .footer-contact p {
    padding-left: 20px;
    margin-left: 10px;
  }

  .footer-socials {
    margin-top: 20px;
  }

  .footer-socials a{
    padding: 10px 10px;
    margin: 0 5px;
    font-size: 35px;
  }
}
/* --- End Responsive --- */
