/* ===== GLOBAL WIDTH CONTROL ===== */
@font-face {
  font-family: 'Glyphic';
  src: url('../fonts/glyphic/Glyphic-Regular.woff2') format('woff2'),
       url('../fonts/glyphic/Glyphic-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.container {
    width: 1200px;
    max-width: 90%;
    margin: 0 auto;
}

/* parent li must be relative */
.main-menu li {
  position: relative;
}

/* dropdown menu */
.main-menu .sub-menu {
  position: absolute;
  top: 100%;          /* directly below main menu */
  left: 0;
  min-width: 200px;
  background: #fff;
  padding: 10px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  display: none;
  z-index: 999;
}

/* show only when open */
.main-menu li.open > .sub-menu {
  display: block;
}

/* submenu items */
.main-menu .sub-menu li {
  padding: 0;
}

.main-menu .sub-menu a {
  display: block;
  padding: 10px 16px;
  white-space: nowrap;
}
.main-menu li.menu-item-has-children > a {
  padding-right: 26px;
}

.main-menu li.menu-item-has-children > a::after {
  content: "▾";
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  cursor: pointer;
}

.main-menu li.open > a::after {
  transform: translateY(-50%) rotate(180deg);
}


/* ===== STICKY HEADER ===== */

.main-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #ffffff;
	padding: 18px 0;
    border-bottom: 1px solid #e5e5e5;
}
/* DESKTOP MENU ALIGN RIGHT */

.main-nav {
    margin-left: auto;
    margin-right: 30px; /* space before Enquire button */
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 40px;
}

/* NAVIGATION */

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
    margin: 0;
    padding: 0;
}


.main-nav ul li a {
    text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 1px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #2e3f3c;
    transition: 0.3s;
}

.main-nav ul li a:hover {
    color: #1c4c45;
}

/* BUTTON */

.btn-enquire {
	text-transform: uppercase;
	letter-spacing: 1px;
    background: #2E6A66;
    color: #fff;
    padding: 12px 22px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    border-radius: 2px;
    transition: 0.3s;
}

.btn-enquire:hover {
    background: #2E6A66;
	color: #fff;
}


/* =========================
   MOBILE HEADER LAYOUT
========================= */

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: #2e3f3c;
    display: block;
}

/* MOBILE VIEW */

@media (max-width: 768px) {

    .main-header {
        background: #ffffff;
        padding: 30px 0;
        border-bottom: 1px solid #e5e5e5;
    }

    .header-container {
        position: relative;
        justify-content: center;
    }

    /* LEFT — ENQUIRE BUTTON */
    .header-btn {
        position: absolute;
        left: 0;
        padding: 10px 0;
    }

    .btn-enquire {
        padding: 10px 12px;
        font-size: 10px;
    }

    /* CENTER — LOGO */
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .logo img {
        height: 36px;
    }

    /* RIGHT — HAMBURGER */
    .hamburger {
        display: flex;
        position: absolute;
        right: 0;
    }

    /* HIDE DESKTOP NAV */
    .main-nav {
        display: none;
    }
}
/* MOBILE MENU PANEL */

@media (max-width: 768px) {

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        padding: 20px 0;
        border-top: 1px solid #e5e5e5;
    }

    .main-nav ul {
		padding-right: 20px;
        flex-direction: column;
        gap: 20px;
        align-items: flex-end;   /* key line */
    }

    /* SHOW MENU */
    .main-nav.active {
		margin-top:30px;
        display: block;
    }

    /* HAMBURGER → X */

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hamburger span {
        transition: 0.3s ease;
    }
}
