/* Reset & Global */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #cfcdcd;
  color: #333;
  line-height: 1.6;
  padding-top: 90px; /* adjust to header height */
}

img {
  max-width: 100%;
  height: auto;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;

  display: flex;
  justify-content: space-between;
  align-items: center;

  background: #004080;
  padding: 0.8rem 1rem; /* slightly smaller for mobile */
  color: #fff;

  flex-wrap: nowrap; /* 🔥 THIS FIXES YOUR PROBLEM */
}


.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo h1 {
  font-size: 1rem;
  white-space: nowrap; /* prevents text from pushing layout */
}


.logo img {
  width: 50px; /* smaller for mobile */
  height: 50px;
}

.logo h1 span {
  color: #00bfff;
}

.menu-toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

/* ========================= */
/* MOBILE MENU FIX */
/* ========================= */
@media (max-width: 768px) {

  header {
  flex-direction: row; /* force horizontal layout */
  justify-content: space-between;
  align-items: center;
}


  .menu-toggle {
    display: block;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    z-index: 10002;
  }

  /* dropdown container fix */
  nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
  }

  nav ul {
    flex-direction: column;
    background: #004080;
    width: 100%;
    text-align: center;

    /* hidden state */
    max-height: 0;
    overflow: hidden;
    opacity: 0;

    transition: max-height 0.4s ease, opacity 0.3s ease;
  }

  /* show menu */
  nav ul.active {
    max-height: 500px; /* enough space for all links */
    opacity: 1;
  }

  nav ul li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  background: #e6f2ff;
  width: 100%;
}

.hero h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.hero p {
  margin-bottom: 2rem;
}

.btn {
  background: #004080;
  color: #fff;
  padding: 0.5rem 0.5rem;
  margin: 0.5rem;
  text-decoration: none;
  border-radius: 5px;
}

.btn-alt {
  background: #00bfff;
  color: #004080;
}

/* Sections */
section {
  padding: 3rem 2rem;
  width: 100%;
  margin: auto;
  box-sizing: border-box;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #004080;
}

/* Projects Section */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  padding: 1rem;
  border-radius: 8px;
  margin: 0 auto;
  box-sizing: border-box;
}

.project {
  background: #eee;
  padding: 1em;
  border-radius: 8px;
  transition: transform 0.3s ease;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.project:hover {
  transform: translateY(-5px);
}

/* Mobile Full Width Fix */
@media (max-width: 768px) {

  section {
    padding: 1rem;
    width: 100%;
    margin: 0;
  }

  .projects {
    grid-template-columns: 1fr;
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    gap: 1rem;
  }

  .project {
    width: 100%;
    margin: 0;
    border-radius: 0;
    padding: 1.2rem;
  }
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
  width: 100%;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: inherit;
  width: 100%;
}

/* Footer */
footer {
  text-align: center;
  padding: 1.5rem;
  background: #004080;
  color: #fff;
  margin-top: 2rem;
}

.resize-image {
  width: 100%;
  max-width: 100%;
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
}

.resize-image img {
  width: 100%;
  max-width: 400px;
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: 10px;
  padding-top: 20px;
}

.resize-image .h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.resize-image p {
  font-size: 1rem;
  line-height: 1.6;
}

/* About Section */
.about-container {
  gap: 20px;
  padding: 20px;
  padding-top: 10%;
}

#clock {
  font-size: 2rem;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
}

.current {
  display: flex;
  justify-content: center;
  align-items: center;
}

.date {
  background: #004080;
  color: #FFD369;
  padding: 20px 0;
  text-align: center;
  font-size: 1.2rem;
}

.welcome-message {
  background: linear-gradient(to right, #ff0000, #00ff00, #0000ff);
  color: white;
  font-size: 1.5rem;
  text-align: center;
  padding: 30px 30px;
  border-radius: 10px;
  box-shadow: 0 4px 12px #004080;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: 'Montserrat', sans-serif;
  transform: translateY(-50px);
  animation: fadeInSlide 1.5s ease-out forwards;
  opacity: 0;
}

/* Social Icons */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding-top: 2%;
}

.social-icons a {
  text-decoration: none;
  color: white;
  background: #d83d3d;
  padding: 10px;
  border-radius: 50%;
  font-size: 20px;
  transition: background 0.3s;
}

.social-icons a:hover {
  background: #0077b5;
}

/* Reviews Section */
.reviews {
  width: 100%;
  margin: 2rem auto;
  padding: 0 1rem;
}

.review-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.review-card h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #333;
}

.stars {
  color: #f5b50a;
  margin: 0.5rem 0;
}

.review-text {
  font-size: 1rem;
  line-height: 1.5;
  color: #555;
}

.customer {
  background: #004080;
  color: #fff;
  padding: 1rem;
  text-align: center;
}

/* Popup Image */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 10000;
  display: none;
  justify-content: center;
  align-items: center;
}

.popup img {
  width: auto;
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0px 5px 20px rgba(0,0,0,0.5);
  animation: zoomIn 0.5s;
  display: block;
  margin: auto;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  z-index: 10001;
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Mobile tweaks */
@media (max-width: 480px) {
  header {
    flex-direction: row; /* ✅ keep everything in one line */
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
  }


  .logo img {
    width: 60px;
    height: 60px;
  }

  .hero h2 {
    font-size: 1.3rem;
  }

  .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }

  .welcome-message {
    font-size: 1rem;
    padding: 15px;
  }

  .social-icons a {
    font-size: 18px;
    padding: 8px;
  }
}
