/* || RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  display: block;
}

/* || VARIABLES */
:root {
  /* FONTS */
  --FF: "Montserrat", sans-serif;
  --FF-HEADING: "Playfair Display", serif;
  --FS-LOGO: clamp(16px, 2.7vw, 38.88px);
  --FS-HEADING: clamp(1.5rem, 1.5vw, 2rem);
  --FS: 1rem;
  /* COLORS */
  --FONT-COLOR: black;
  --NAV-HOVER-COLOR: darkred;
  --LINK-HOVER-COLOR: brown;
  --LINK-ACTIVE-COLOR: red;
  --NAV-ACTIVE-COLOR: #f3d19e;
  --BG-COLOR: #f2d9b4;
  --BG-FADED-COLOR: white;
  --BG-IMAGE: linear-gradient(to bottom, #f2d9b4 0%, #f2d9b4 30%, white 80%);
}

/* || GENERAL */

html {
  font-size: var(--FS);
}

body {
  height: auto;
  margin: 0;
  background-color: var(--BG-COLOR);
  background-image: var(--BG-IMAGE);
  background-attachment: fixed;
  font-family: var(--FF);
  color: var(--FONT-COLOR);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--FF-HEADING);
}

p {
  font-family: var(--FF);
}

/* || HEADER */

/* || OVERLAY FOR PAGE LOADING */
#page-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, #f2d9b4 0%, #f2d9b4 30%, white 80%);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
  opacity: 1;
  visibility: visible;
}

#page-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-text {
  color: #000;
  font-family: "Times New Roman", Times, serif;
  font-size: 5rem;
  animation: pulse 2s ease-in-out infinite;

  /* THAY ĐỔI MỚI: Thêm transition để chữ mờ đi mượt mà */
  transition: opacity 0.4s ease-out;
}

/* THAY ĐỔI MỚI: Quy tắc để ẩn chữ */
/* Khi #page-overlay có cả lớp .text-hidden, thì .loading-text bên trong sẽ bị ẩn đi */
#page-overlay.text-hidden .loading-text {
  opacity: 0;
}

@keyframes pulse {
  0% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.6;
  }
}

/* || MEDIA QUERIES*/

/* ------------------ Media Query: ≤1200px (Large tablets / small desktops) ------------------ */
@media only screen and (max-width: 1200px) {

  /* || VARIABLES */
  :root {
    --FS-LOGO: clamp(14px, 3vw, 2.5rem);
    --FS-HEADING: clamp(1.3rem, 2.5vw, 1.8rem);
  }

  .nav__top {
    margin-top: 2vh;
  }

  .nav-item-wrapper {
    padding: 0;
  }
}

/* ------------------ Media Query: ≤992px (Tablets) ------------------ */
@media only screen and (max-width: 992px) {
  :root {
    --FS-LOGO: clamp(13px, 4vw, 2.2rem);
    --FS-HEADING: clamp(1.2rem, 3vw, 1.6rem);
  }

  .nav-item-wrapper:has(.nav__about),
  .nav-item-wrapper:has(.nav__newsletter) {
    display: none;
  }

  .nav-item-wrapper {
    width: 30vw;
  }
}

/* ------------------ Media Query: ≤768px (Small tablets / large phones) ------------------ */
@media only screen and (max-width: 768px) {
  :root {
    --FS-LOGO: clamp(12px, 4vw, 2rem);
    --FS-HEADING: clamp(1.2rem, 3vw, 1.5rem);
  }

  .nav__top {
    display: flex;
    justify-content: space-around;
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ------------------ Media Query: ≤600px (Phones) ------------------
   Example: This section contains focused adjustments for small screens.
   - NAV TOP: compact spacing and layout tweaks
   - HIDE SEARCH: remove search from top bar for space
   - LOGO: center and remove decorative borders for cleaner look
   - HAMBURGER MENU: simplify visuals and sizing
   - FOOTER: stack and center content for narrow widths
----------------------------------------------------------------------------------------- */
@media only screen and (max-width: 600px) {

  /* || VARIABLES */
  :root {
    --FS-LOGO: clamp(10px, 10vw, 1.8rem);
  }

  /* NAV TOP */
  .nav__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
  }

  /* HIDE SEARCH */
  .nav-item-wrapper:has(.nav__search) {
    display: none;
  }

  /* LOGO */
  .nav-item-wrapper:has(.nav__logo) {
    position: absolute;
    margin: 0 auto;
    width: auto;
    padding: 0;
    aspect-ratio: unset;
    left: 50%;
    transform: translateX(-50%);
  }

  .nav__logo {
    border: none;
    background: none;
    clip-path: none;
    height: auto;
  }

  /* HAMBURGER MENU */
  .nav__hamburgermenu {
    background: none;
    border: none;
    clip-path: none;
    height: auto;
  }

  .nav__hamburgermenu__icon {
    width: 30px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .nav__hamburgermenu span {
    display: block;
    width: 100%;
    height: 4px;
    background-color: black;
    border-radius: 25px;
  }

  .nav-item-wrapper:has(.nav__hamburgermenu) {
    margin-left: auto;
    z-index: 10;
    width: auto;
    padding-top: 0;
    aspect-ratio: unset;
    /* Tắt tỷ lệ khung hình */
    overflow: visible;
  }

  /* FOOTER */
  .footer__container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .siteinfo__right {
    flex-basis: 100%;
  }

  .icon__container {
    justify-content: center;
  }

  .option {
    margin: 0;
    padding: 0;
    gap: 20px;
    flex-wrap: wrap;
  }
}
