/* Header Styles */
body.hidden-scrolling{
  overflow-y: hidden;
}

header a {  
  margin: 0.625rem; 
}

.header{  
  width: 100%;
  height: 13vh; 
  background-color: var(--primary-base);  
}

.navbar {
  background-color: var(--primary-base);
  display: flex;
  justify-content:space-between;
  align-items: center;  
  padding: 0 1.25rem;
  width: 100%; 
  height: 90px;
}

.navbar .logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.navbar .logo img{
  width: auto;
  height: 80px; 
  max-height: 100%; 
  object-fit: contain; 
  padding: 0.5rem 0;
  transition: all 0.3s ease;
}

#check {
  display: none;
}

/* Hamburger Menu Styling */
.checkbtn {
  font-size: 1.87rem;
  color: var(--white);
  cursor: pointer;
  display: none;
  transition: color 0.3s ease;
  padding: 0.5rem;
}

.checkbtn:hover {
  color: var(--tertiary);
}

/* overlay */
.menu-overlay{
  position: fixed;
  z-index: 999;
  background-color: rgba(0, 0, 0, 0.5);
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.menu-overlay.active{
  transform: translateY(0);
  visibility: visible;
  opacity: 1;
}

.nav-menu{
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 0.93rem; /*15px*/
}

.header .menu > .menu-item{
  display: inline-block;
  margin-left: 1.87rem; 
  position: relative;  
}

.menu a{
  color: var(--white);
  text-transform: capitalize;
  font-size: 1.125rem; /*18px*/
  font-weight: 600;
  transition: all 0.3s ease;
  letter-spacing: 0.3px;
}

.header .menu > .menu-item > a{
  display: block;
  padding: 0.75rem 0;  /*12px*/
  position: relative;
}

.header .menu > .menu-item > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left:  0;
  width: 0;
  height: 3px;
  background-color: var(--tertiary);
  transition: width 0.3s ease;
}

.header .menu > .menu-item > a:hover::after {
  width: 100%;
}

.menu a:hover{
  color: var(--tertiary);
}

/* Dropdown Menu*/
.sub-menu{
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  width: 14rem; /* 224px */
  position: absolute;
  border-radius: 6px;
  right: auto;
  left: 0;
  top: 100%;
  background-color: var(--primary-base);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  padding: 0.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-item:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  z-index: 1000;
}

.sub-menu > .menu-item{
  display: block;
}

.sub-menu .menu-item > a{
  display: block;
  padding: 0.75rem 1.25rem;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.sub-menu .menu-item > a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--tertiary);
  padding-left: 1.5rem;
}

.menu-has-children > a > i {
  font-size: 0.8rem;
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.menu-has-children:hover > a > i {
  transform: rotate(180deg);
}

.close-nav-menu{
  display: none;
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  height: 40px;
  width: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 1001;
}

.close-nav-menu:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.header .close-nav-menu img{
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

/* ========== RESPONSIVE HEADER - CORRECT ORDER ========== */

/* Extra Large Desktop (1920px and above) */
@media (min-width: 1920px) {
  .navbar .logo img {
    height: 100px; 
    max-width: 300px;
  }
  
  .navbar {
    height: 110px;
    padding: 0 2rem;
  }
}

/* Large Desktop (1440px and above) */
@media (min-width: 1440px) {
  .navbar .logo img {
    height: 90px; 
    max-width: 250px;
  }
  
  .navbar {
    height: 100px;
  }
}

/* 1300px - 1440px */
@media (max-width: 1440px) {
  .header a{
    margin: 0.35rem; 
  }
  
  .navbar .logo img {
    height: 85px;
    max-width: 220px;
  }

  .header .menu > .menu-item {
    margin-left: 1.25rem; 
  }

  .menu a {
    font-size: 1.06rem; 
    letter-spacing: 0.2px;
  }
  
  .nav-menu {
    padding: 0 0.5rem;
  }
}

/* 1240px - 1300px */
@media (max-width: 1300px) {
  .header .menu > .menu-item {
    margin-left: 1rem; 
  }
  
  .menu a {
    font-size: 1rem;
    letter-spacing: 0.1px;
  }
  
  .navbar {
    padding: 0 0.75rem; 
  }
  
  .nav-menu {
    padding: 0 0.25rem;
  }
  
  .sub-menu {
    width: 12rem; 
  }
}

/* 1120px - 1240px */
@media (max-width: 1240px) {
  .menu a {
    font-size: 0.95rem;
    white-space: nowrap; 
  }
  
  .header .menu > .menu-item {
    margin-left: 0.875rem;
  }
  
  .menu-has-children > a > i {
    font-size: 0.7rem;
    margin-left: 0.25rem;
  }
}

/* 1100px - 1120px */
@media (max-width: 1120px) {
  .menu a{
    font-size: 0.9rem; 
    letter-spacing: 0.1px;
  }
  
  .nav-menu{
    padding: 0 0.5rem;
  }
  
  .navbar .logo img{
    height: 80px;
    max-width: 200px;
  }
  
  .header .menu > .menu-item {
    margin-left: 0.75rem; 
  }
}

/* Tablet Landscape (992px - 1100px) */
@media (max-width: 1100px) {
  .menu a {
    font-size: 0.9rem; 
  }
  
  .header .menu > .menu-item {
    margin-left: 0.75rem;
  }
  
  .navbar {
    padding: 0 0.5rem;
  }
}

/* Tablet Landscape (max-width: 991px) - Mobile menu starts */
@media (max-width: 991px) {
  .navbar {
    padding: 0 1rem;
    height: 85px;
    justify-content: space-between;
  }
  
  .navbar .logo {
    margin-left: 0;
    flex: 0 0 auto;
  }
  
  .navbar .logo img {
    height: 75px;
    max-width: 180px;
  }
  
  /* Mobile menu styles */
  .nav-menu {
    position: fixed;
    right: -280px;
    visibility: hidden;
    width: 280px;
    height: 100%;
    top: 0;
    overflow-y: auto;
    background-color: var(--primary-base);
    z-index: 1000;
    padding: 1.25rem 0;
    transition: all 0.5s ease;
    margin-right: 0;
    padding-top: 4rem;
    justify-content: flex-start;
  }
  
  .header .nav-menu.open{
    visibility: visible;
    right: 0;
  }
  
  .header .menu {
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
  }
  
  .header .menu > .menu-item{
    display: block;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .header .menu > .menu-has-children > a{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 1.5rem;
  }
  
  .header .menu > .menu-item > a{
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .header .menu > .menu-item:first-child > a{
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .header .menu > .menu-item > a::after {
    display: none;
  }
  
  .header .menu > .menu-item > .sub-menu{
    width: 100%;
    position: relative;
    opacity: 1;
    visibility: visible;
    border: none;
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: none;
    transform: none;
    padding: 0;
    left: auto;
    top: auto;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-radius: 0;
  }
  
  .menu-has-children.active > .sub-menu {
    max-height: 500px !important;
  }
  
  .header .menu > .menu-item > .sub-menu > .menu-item > a{
    padding: 0.75rem 2.5rem;
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  .header .menu > .menu-item > .sub-menu > .menu-item:last-child > a{
    border-bottom: none;
  }
  
  .header .close-nav-menu,
  .header .open-nav-menu{
    display: flex;
  }
  
  .checkbtn {
    display: flex;
    margin-right: 0.5rem;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    flex: 0 0 auto;
  }
  
  .checkbtn i{
    color: var(--white);
    font-size: 1.5rem;
  }
  
  .menu-has-children.active > a > i {
    transform: rotate(180deg);
  }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 768px) {
  .navbar .logo img {
    height: 70px;
    max-width: 160px;
  }
  
  .navbar {
    height: 80px;
    padding: 0 0.75rem;
  }
  
  .navbar .logo {
    margin-left: -0.5rem;
  }
}

/* Large Mobile (576px - 768px) */
@media (max-width: 576px) {
  .header .nav-menu{
    width: 100%;
    right: -100%;
  }
  
  .header .nav-menu.open{
    right: 0;
  }
  
  .navbar .logo img {
    height: 65px;
    max-width: 150px;
  }
  
  .navbar {
    height: 75px;
  }
  
  .navbar .logo {
    margin-left: -0.75rem;
  }
}

/* Medium Mobile (480px - 576px) */
@media (max-width: 480px) {
  .navbar .logo img {
    height: 60px;
    max-width: 140px;
  }
  
  .navbar {
    height: 70px;
    padding: 0 0.5rem;
  }
  
  .navbar .logo {
    margin-left: -0.5rem;
  }
}

/* Small Mobile (380px - 480px) */
@media (max-width: 380px) {
  .navbar .logo img {
    height: 55px;
    max-width: 130px;
  }
  
  .navbar {
    height: 65px;
  }
}

/* Extra Small Mobile (up to 380px) */
@media (max-width: 350px) {
  .navbar .logo img {
    height: 50px;
    max-width: 120px;
  }
  
  .navbar {
    height: 60px;
  }
}

/* Samsung A56 specific fixes - should be at the end */
/* Samsung A56 Landscape */
@media (max-height: 500px) and (orientation: landscape) {
  .header {
    height: auto;
    min-height: 70px;
  }
  
  .header .nav-menu {
    width: 320px;
    padding-top: 4.5rem;
    overflow-y: auto;
  }
  
  .close-nav-menu {
    top: 1rem;
    right: 1rem;
    z-index: 1002;
  }
  
  .header .menu {
    margin-top: 1rem;
  }
  
  .header .menu > .menu-item > a {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .sub-menu .menu-item > a {
    font-size: 0.9rem;
    padding: 0.5rem 2.5rem;
  }
}

/* Extra short landscape screens */
@media (max-height: 450px) and (orientation: landscape) {
  .header .nav-menu {
    padding-top: 3.5rem;
  }
  
  .close-nav-menu {
    top: 0.75rem;
    right: 0.75rem;
  }
  
  .header .menu > .menu-item > a {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Footer Section */
.footer {
  background-color: var(--primary-base);
  color: var(--white);
  width: 100%;
  padding: 2.5rem 1rem;
  margin-top: auto;
}

.footer-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo {
  flex: 0 0 250px;
}

.footer-logo img {
  max-width: 250px;
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.footer-links {
  flex: 1;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-column {
  min-width: 150px;
}

.footer-column h3 {
  color: var(--tertiary);
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
}

.footer-column ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 0.75rem;
}

.footer-column ul li a {
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-column ul li a:hover {
  color: var(--tertiary);
  padding-left: 0.5rem;
}

.footer-column ul li a i {
  font-size: 0.9rem;
}

.media-icon {
  flex: 0 0 200px;
}

.media-icon h3 {
  text-align: left;
  color: var(--tertiary);
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}

.media-icon ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1rem;
}

.media-icon ul li {
  display: inline-block;
}

.media-icon ul li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.25rem;
  transition: all 0.3s ease;
}

.media-icon ul li a:hover {
  background-color: var(--tertiary);
  color: var(--primary-base);
  transform: translateY(-3px);
}

.bottom-bar {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
}

/* Responsive footer - in correct order */
@media (max-width: 991px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2.5rem;
  }
  
  .footer-logo {
    flex: 0 0 auto;
  }
  
  .footer-links {
    justify-content: center;
    width: 100%;
  }
  
  .footer-column {
    min-width: 180px;
  }
  
  .footer-column h3 {
    text-align: center;
  }
  
  .media-icon {
    flex: 0 0 auto;
  }
  
  .media-icon h3 {
    text-align: center;
  }
  
  .footer-column ul li a {
    justify-content: center;
  }
  
  .footer-column ul li a:hover {
    padding-left: 0;
  }
}

@media (max-width: 576px) {
  .footer {
    padding: 2rem 0.75rem;
  }
  
  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  
  .footer-column {
    width: 100%;
    max-width: 250px;
  }
  
  .media-icon ul {
    justify-content: center;
  }
}

/* Optional: If you want even more left positioning on desktop */
@media (min-width: 992px) {
  .navbar .logo {
    margin-left: -1rem; 
  }
}