body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background-color: #f9f9f9;
  color: #333;
}

main {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin: 2rem auto;
  max-width: 1200px;
  width: calc(100% - 2rem);
  overflow: hidden;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo {
  font-weight: bold;
  font-size: 1.25rem;
}

.logo img {
  height: 50px;
  width: auto;
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 421;
  min-height: 250px;
  max-height: 550px;
  color: #fff;
  text-align: center;
  overflow: hidden;
  background-color: #000;
}

@media (min-width: 768px) {
  .hero {
    min-height: 350px;
  }
}

@media (min-width: 1024px) {
  .hero {
    min-height: 450px;
  }
}

@media (min-width: 1440px) {
  .hero {
    min-height: 550px;
  }
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

@media (max-width: 767px) {
  .hero {
    aspect-ratio: auto;
    min-height: 250px;
  }

  .hero-slide {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
  }
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0;
}

.hero-message {
  text-align: center;
  padding: 4rem 1rem;
}

.hero-message h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.75rem, 5vw, 3rem);
}

.hero-message p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto;
}

.modern-hero {
  position: relative;
  text-align: center;
  padding: 6rem 1rem;
  color: #fff;
  background: url('/uploads/hero/earth-bg.jpg') center/cover no-repeat;
  overflow: hidden;
}

.modern-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 0;
}

.modern-hero > * {
  position: relative;
  z-index: 1;
}

.modern-hero h1 {
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
}

.modern-hero p {
  max-width: 600px;
  margin: 0 auto;
}

.typewriter {
  display: inline-block;
  border-right: .15em solid rgba(255,255,255,0.75);
  white-space: normal;
  font-size: 1.5rem;
}

.about {
  padding: 2rem 1rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-gallery {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.about-gallery figure {
  text-align: center;
}

.about-gallery img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.about-gallery figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #555;
}

.portfolio {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
@media (min-width: 1024px) {
  .projects {
    grid-template-columns: repeat(3, 1fr);
  }
}
.project {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 1rem;
  display: flex;
  flex-direction: column;
}
.project h3 {
  margin-top: 0;
}
.project img {
  width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: contain;
  margin-bottom: 1rem;
}

@media (max-width: 1024px) {
  .project img {
    max-height: 130px;
  }
}

@media (max-width: 768px) {
  .project img {
    max-height: 110px;
  }
}

@media (max-width: 480px) {
  .project img {
    max-height: 90px;
  }
}
.view-link {
  margin-top: auto;
  text-decoration: none;
  color: #0b79d0;
  font-weight: bold;
}

.contact {
  padding: 2rem 1rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: 2rem auto 0;
  padding: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  font-weight: 500;
  font-size: 0.9rem;
}

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

.contact-form button {
  align-self: flex-start;
  padding: 0.75rem 1.5rem;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.contact-form .form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-form .form-actions button {
  margin-left: auto;
  align-self: center;
}

.contact-form button:hover {
  background: #000;
}

@media (max-width: 480px) {
  .contact-form .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-form .form-actions button {
    margin-left: 0;
    width: 100%;
  }
  
  .contact-form input, .contact-form textarea {
	width: 93%;
  }
}

.contact .success {
  color: #2a2a72;
  font-weight: 600;
}

.contact .errors {
  color: #b00020;
  list-style: none;
  padding: 0;
}

.intro {
  padding: 2rem 1rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.services {
  padding: 2rem 1rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.service-item img {
  width: 100%;
  max-width: 200px;
  height: auto;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.service-item span {
  display: block;
  font-weight: 600;
}
footer {
  text-align: center;
  padding: 1.5rem;
  background: #2a2a72;
  color: #fff;
  margin-top: 2rem;
}

.admin-container {
  max-width: 600px;
  margin: 2rem auto;
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-container h1 {
  text-align: center;
}

.admin-container form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-container input[type="text"],
.admin-container input[type="password"],
.admin-container input[type="file"] {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.admin-container button {
  align-self: flex-start;
  padding: 0.5rem 1rem;
  background: #0b79d0;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.admin-container button:hover {
  background: #095a9d;
}

.project-list {
  list-style: none;
  padding: 0;
}

.project-list li {
  margin-bottom: 0.5rem;
}

.project-list form {
  display: inline;
}

.message {
  color: #0b79d0;
  font-weight: bold;
}

@media (max-width: 1024px) {
  .typewriter {
    font-size: 1.25rem;
  }
}

@media (max-width: 768px) {
  .hero-message {
    padding: 3rem 1rem;
  }

  .hero-message h1 {
    font-size: 2rem;
  }

  .modern-hero {
    padding: 3rem 1rem;
  }

  .modern-hero h1 {
    font-size: 2rem;
  }

  .typewriter {
    font-size: 1.1rem;
  }

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

  .nav-links {
    position: absolute;
    right: 1rem;
    top: 60px;
    background: #fff;
    flex-direction: column;
    width: 150px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    margin: 0.5rem 0;
  }

  .menu-toggle {
    display: block;
  }
}

@media (max-width: 480px) {
  .hero-message h1 {
    font-size: 1.75rem;
  }

  .hero-message p {
    font-size: 1rem;
  }

  .modern-hero {
    padding: 3rem 1rem 5rem;
  }

  .modern-hero h1 {
    font-size: 1.75rem;
  }

  .typewriter {
    font-size: 1rem;
  }

  .service-item img {
    width: 100%;
    max-width: 200px;
    height: auto;
  }
}
