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

body {
  font-family: "Segoe UI";
  color: white;
  background: #0f0f0f;
  scroll-behavior: smooth;
}

/* ================= HEADER ================= */
header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 75px;

  /* 🔥 TRANSPARENT GLASS EFFECT */
  background: rgba(0, 0, 0, 0.3); /* more transparent */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 25px;

  z-index: 1000;

  /* 🔥 SMOOTH TRANSITION */
  transition: 0.3s ease;
}

header.scrolled {
  background: rgba(0, 0, 0, 0.85); /* darker when scroll */
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

header nav a {
  margin: 0 6px;
  padding: 8px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  text-decoration: none;
  transition: 0.25s;
}

/* ORANGE MENU 🔥 */
header nav a:hover,
header nav a.active {
  background: linear-gradient(45deg, #ff7a18, #ff4b2b);
  box-shadow: 0 0 12px rgba(255, 120, 50, 0.6);
}

nav a {
  padding: 8px 15px;
  border-radius: 20px;
  transition: 0.3s;
}

nav a:hover {
  background: rgba(255, 140, 0, 0.3); /* orange theme */
}

/* ================= HERO ================= */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column; /* 🔥 FIX */
  justify-content: center;
  align-items: center;

  text-align: center;
  padding: 0 20px; /* 🔥 FIX mobile */

  background:
    linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.9)),
    url("assets/traffic.jpg");

  background-size: cover;
  background-position: center;
}

.hero h2 {
  max-width: 900px; /* 🔥 keeps center */
  font-size: 42px;
  line-height: 1.3;
}

.hero p {
  margin-top: 15px;
  max-width: 600px; /* 🔥 prevents right shift */
}

.creator {
  margin-top: 15px;
  font-size: 16px;
  color: #ccc;
}

.creator span {
  color: #ff7a18;
  font-weight: bold;
}

/* ================= SECTIONS ================= */
section {
  min-height: 100vh;
  padding: 110px 8%;
}

/* ================= ABOUT ================= */
#about {
  background: linear-gradient(135deg, #1f1c2c, #302b63);
}

.about-box {
  background: rgba(255, 255, 255, 0.08);
  padding: 20px;
  margin-top: 40px;
  border-radius: 15px;
}

/* ================= FEATURES ================= */
#features {
  background: linear-gradient(135deg, #2c3e50, #4ca1af);
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

/* CARDS */
.card {
  padding: 25px;
  border-radius: 15px;
  text-align: center;

  background: rgba(0, 0, 0, 0.4); /* FIXED VISIBILITY */

  transition: 0.25s;
}

.card:hover {
  transform: translateY(-8px);
  background: linear-gradient(45deg, #ff7a18, #ff4b2b);
  color: white;
}

section h2 {
  margin-bottom: 35px; /* 🔥 GAP BETWEEN TITLE & CARDS */
}

/* ================= TECH ================= */
#tech {
  background: linear-gradient(135deg, #141e30, #243b55);
}

.tech-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.tech-card {
  padding: 25px;
  border-radius: 15px;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  transition: 0.25s;
}

.tech-card:hover {
  transform: translateY(-8px);
  background: linear-gradient(45deg, #ff7a18, #ff4b2b);
}

/* ================= WORKING ================= */
#working {
  background: linear-gradient(135deg, #000428, #004e92);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.steps div {
  padding: 15px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  transition: 0.2s;
}

/*==============================================*/

/* WORKING SECTION */
#working {
  padding: 80px 10%;
  background: linear-gradient(135deg, #1c1c1c, #2c3e50);
}

.work-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* EACH STEP */
.work-step {
  display: flex;
  align-items: center;
  gap: 25px;

  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 15px;

  transition: 0.3s;
}

.work-step:hover {
  transform: translateY(-5px);
  background: rgba(255, 140, 0, 0.15);
}

/* IMAGE */
.work-step img {
  width: 220px;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
}

/* TEXT */
.work-step h3 {
  margin-bottom: 8px;
  color: #ff8c00;
}

.work-step p {
  color: #ddd;
}

.work-step {
  display: flex;
  gap: 25px;
  align-items: center;

  background: rgba(255, 255, 255, 0.05);
  padding: 20px;
  border-radius: 15px;

  transition: 0.3s;
}

.work-step:hover {
  transform: translateY(-5px);
  background: rgba(255, 140, 0, 0.15);
}

.work-step img {
  width: 220px;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
}

.alert-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.alert-images img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 10px;

  transition: 0.3s;
}

.alert-images img:hover {
  transform: scale(1.05);
}

.alert-images img {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

/* MULTIPLE IMAGES GRID */
.work-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 250px;
}

.work-images img {
  width: 100%;
  border-radius: 10px;
  transition: 0.3s;
  cursor: pointer;
}

.work-images img:hover {
  transform: scale(1.05);
}

/* ALIGNMENT FIX */
.work-step {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 40px;
}

/* TEXT SIDE */
.work-content {
  flex: 1;
}

.work-content ul {
  margin-top: 10px;
}

/* ================= MODAL ================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
}

.modal-content {
  background: #1c1c1c;
  margin: 6% auto;
  padding: 30px;
  width: 65%;
  border-radius: 15px;
  animation: popup 0.3s ease;
}

@keyframes popup {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.grid,
.tech-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 20px;
}

/*=====================FLOATING SCROLL BUTTONS===================*/
.scroll-buttons {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.scroll-buttons button {
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;

  background: linear-gradient(135deg, #ff7a18, #ffb347);
  color: #000;

  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: 0.3s;
}

.scroll-buttons button:hover {
  transform: scale(1.1);
}

.scroll-buttons button {
  backdrop-filter: blur(10px);
  opacity: 0.9;
}

/*=====================IMAGE MODAL===================*/

.img-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(0,0,0,0.9);
}

.modal-content {
    display: block;
    margin: auto;
    max-width: 80%;
    max-height: 80%;
    margin-top: 60px;
    border-radius: 10px;
    animation: zoomIn 0.3s ease;
}

.close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 35px;
    color: white;
    cursor: pointer;
}

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

/* ================= FOOTER ================= */
footer {
  text-align: center;
  padding: 20px;
  background: #111;
  color: #aaa;
}

footer span {
  color: #ff7a18;
  font-weight: bold;
}

.diagram-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.diagram-box {
    background: #111;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.diagram-box img {
    width: 100%;
    border-radius: 8px;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {
  .hero h2 {
    font-size: 26px;
  }

  .hero p {
    font-size: 14px;
  }

  .about-container {
    flex-direction: column;
  }

  .about-right {
    margin-top: 20px;
  }

  .grid,
  .tech-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .grid,
  .tech-container {
    grid-template-columns: 1fr;
  }

  header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  header nav a {
    margin: 5px;
  }
}

@media (max-width: 768px) {
  .work-step {
    flex-direction: column;
    text-align: center;
  }

  .work-step img {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 768px) {
  .alert-images {
    grid-template-columns: 1fr;
  }
}

/* MOBILE SIZE */
@media (max-width: 768px) {
  .scroll-buttons {
    right: 10px;
    bottom: 20px;
  }

  .scroll-buttons button {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 768px) {
  .work-step {
    flex-direction: column;
    text-align: center;
  }

  .work-images {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
  }
}

/* MOBILE */
@media (max-width: 768px) {
  .work-step {
    flex-direction: column;
    text-align: center;
  }

  .work-step img {
    width: 100%;
  }
}

/*=====================================================*/

/* ROTATE SCREEN BLOCK */
#rotateMessage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);

  display: none;
  justify-content: center;
  align-items: center;
  text-align: center;

  z-index: 9999;
}

/* MESSAGE BOX */
.rotate-box {
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  padding: 30px;
  border-radius: 15px;

  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

/* SMALL TEXT */
.rotate-box span {
  display: block;
  font-size: 16px;
  margin-top: 10px;
  opacity: 0.8;
}

.rotate-box {
  animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
