/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  line-height: 1.6;
  color: #333;
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(17,17,17,0.9);
  backdrop-filter: blur(10px);
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background: #111;
  color: white;
  position: relative;
}

.logo {
  font-size: 22px;
  font-weight: bold;
}

/* MENU */
nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  position: relative;
}

nav ul li a {
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  display: block;
  transition: 0.3s;
}

nav ul li a:hover {
  color: orange;
}

nav ul li a.active {
  color: orange;
  border-bottom: 2px solid orange;
}

/* HAMBURGER */
.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

/* HERO */
.hero {
  height: 90vh;
  background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
              url('https://picsum.photos/1600/900');
  background-size: cover;
  background-position: center;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

/* SECTIONS */
section {
  padding: 60px 20px;
  text-align: center;
}

.container {
  max-width: 1100px;
  margin: auto;
}

/* GRID */
.grid {
  display: grid;
  gap: 20px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* CARDS */
.card {
  background: #f4f4f4;
  padding: 20px;
  border-radius: 10px;
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-10px);
}

/* GALLERY */
.gallery img {
  width: 100%;
  border-radius: 10px;
}

/* BUTTON */
.btn {
  background: orange;
  padding: 12px 25px;
  color: white;
  border: none;
  cursor: pointer;
  margin-top: 15px;
  transition: 0.3s;
}

.btn:hover {
  background: darkorange;
  transform: scale(1.05);
}

/* FORM */
form input, form textarea {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
}

/* FOOTER */
footer {
  background: #111;
  color: white;
  text-align: center;
  padding: 20px;
}

/* ANIMATION */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: 1s;
}

.fade-in.active {
  opacity: 1;
  transform: translateY(0);
}

/* PROGRESS BAR */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: orange;
  z-index: 2000;
}

/* DARK MODE */
body.dark {
  background: #121212;
  color: #eee;
}

body.dark .card {
  background: #1e1e1e;
}

body.dark footer {
  background: #000;
}

/* ========================= */
/* MEGA MENU */
/* ========================= */

/* DESKTOP */
@media (min-width: 769px) {

  .has-mega {
    position: relative;
  }

  .mega-menu {
    position: absolute;
    top: 120%;
    left: 0;
    width: 500px;
    background: white;
    display: flex;
    gap: 20px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);

    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: 0.3s;
  }

  .has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .mega-column {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .mega-column a {
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    color: #333;
  }

  .mega-column a span {
    font-size: 13px;
    color: gray;
  }

  .mega-column a:hover {
    background: #f5f5f5;
  }
}

/* ========================= */
/* MOBILE RESPONSIVE */
/* ========================= */

@media (max-width: 768px) {

  .menu-toggle {
    display: block;
  }

  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #111;
    position: absolute;
    top: 65px;
    left: 0;
  }

  nav ul.active {
    display: flex;
  }

  nav ul li {
    width: 100%;
  }

  nav ul li a {
    padding: 15px;
    border-top: 1px solid #222;
  }

  /* MOBILE MEGA MENU */
  .mega-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #1a1a1a;
    padding: 0;
  }

  .has-mega.active .mega-menu {
    display: flex;
  }

  .mega-column a {
    color: white;
    padding: 12px 20px;
    border-top: 1px solid #333;
  }

  .mega-column a span {
    color: #aaa;
  }

  /* HERO */
  .hero {
    height: auto;
    padding: 80px 20px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .hero p {
    font-size: 14px;
  }

  /* LAYOUT */
  section {
    padding: 40px 15px;
  }

  .navbar {
    padding: 15px 20px;
  }

  .btn {
    width: 100%;
  }

  img {
    max-width: 100%;
    height: auto;
  }

}
/* IMPROVED MOBILE HEADER */
@media (max-width: 768px) {

  .navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .logo {
    font-size: 18px;
    flex: 1;
    text-align: center;
  }

  .menu-toggle {
    flex: 0;
  }

  .btn-small {
    padding: 6px 10px;
    font-size: 12px;
  }

}
@media (max-width: 768px) {
  .btn-small {
    font-size: 0;
    width: 36px;
    height: 36px;
    padding: 0;
  }

  .btn-small::after {
    content: "🌙";
    font-size: 16px;
  }
}