* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif;
  color: #fff;
}

body {
  height: 100vh;
  overflow-x: hidden;
  background-color: rgb(30, 30, 30);
}

html {
  scroll-behavior: smooth;
}

main {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow-x: hidden;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.opacity-down {
  opacity: 0.4;
}

.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1), transform 0.7s cubic-bezier(.4,0,.2,1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* -- Navbar -- */

.navbar {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
}

#activator {
  position: absolute;
  visibility: hidden;
}

.nav-label {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 12;
  margin: 1rem 2rem;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: transform 0.5s ease;
}

.arrow {
  height: 2px;
  width: 100px;
  background-color: rgb(255, 255, 255);
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 1));
}

.arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 25px;
  height: 25px;
  border: 2px solid transparent;
  border-top-color: #fff;
  border-right-color: #fff;
  transform: translate(-30%, -50%) rotate(45deg);
}

#activator:checked ~ .nav-label {
  transform: translateX(400%) rotate(180deg);
}

#activator:checked ~ .nav-container {
  transform: translateX(100%);
}

.nav-container {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 300px;
  min-height: 100vh;
  background-color: rgb(10, 10, 10, 0.9);
  right: 0;
  transition: transform 0.5s ease;
}

.nav-list {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nav-item {
  list-style: none;
}

.nav-item a {
  font-size: 2rem;
  text-decoration: none;
  cursor: pointer;
}

.nav-item svg {
  width: 2.5rem;
  height: 2.5rem;
  fill: none;
}

/* -- Language toggle -- */

.lang-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 1rem;
  font-family: "Montserrat", sans-serif;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
  margin-top: 0.5rem;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

/* -- Hero Section -- */

#hero {
  position: relative;
  width: 100%;
  height: 100%;
}

.container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding-right: 4rem;
  gap: 2rem;
  z-index: 2;
}

/* Centered container modifier for pages like 404 */
.container--center {
  align-items: center;
  padding-right: 0;
  text-align: center;
}

/* 404 / error page specific styles */
main.page-404 {
  height: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.error-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  flex: 1 1 auto;
  overflow: visible;
}

.error-hero .title {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1;
}

.error-hero .slogan {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  margin-top: 0.25rem;
}

.error-hero .lead {
  margin-top: 1rem;
  color: rgba(255,255,255,0.9);
  max-width: 720px;
}

.error-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 18px;
  background: #b472c4;
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(180,114,196,0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(180,114,196,0.22); }

.btn--ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: none;
}

/* Ensure background sits behind content */
.background-container {
  position: absolute;
  z-index: -2;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.background-hero {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.title {
  color: rgb(255, 255, 255);
  font-size: clamp(4rem, 14vw, 10rem);
  line-height: 0.35;
  font-family: "Zain", sans-serif;
  text-shadow: 0 0 10px rgb(0, 0, 0, 0.4);
}

.slogan {
  font-size: clamp(1.2rem, 3vw, 2rem);
  text-shadow: 0 0 10px rgb(0, 0, 0, 0.4);
}

#keywords {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-style: italic;
  font-weight: 400;
  color: rgba(154, 93, 168, 0.8);
  font-family: "Zain", sans-serif;
  opacity: 1;
  transition: opacity 0.5s ease;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.fade-container {
  display: inline-block;
  transition: opacity 0.5s ease;
  opacity: 1;
}

.fade-container.fade-out {
  opacity: 0;
}

#logo {
  position: absolute;
  height: 110%;
  top: 0;
  right: calc(80% - 400px);
  transform: translate(5%, -5%);
  overflow: visible;
  z-index: 1;
}

#upperStroke {
  animation: translateTopLogo 2s ease forwards;
}

#lowerStroke {
  animation: translateBottomLogo 2s ease forwards;
}

@keyframes translateTopLogo {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 0.7;
    transform: translateX(0);
  }
}

@keyframes translateBottomLogo {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 0.7;
    transform: translateX(0);
  }
}

@media screen and (max-width: 768px) {
  .container {
    gap: 10rem;
    padding-right: 1rem;
  }
  .slogan {
    text-align: right;
  }
}

@media screen and (max-width: 480px) {
  .container {
    gap: 6rem;
    padding-right: 0.75rem;
  }
}

.background-container {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.background-glass {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.08);
  z-index: 0;
}

.background-hero {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  object-fit: cover;
}

/* -- About Us / Services -- */

#about {
  position: relative;
  background-color: rgb(40, 40, 40);
}

#about::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -20%;
  left: 0;
  height: 200px;
  width: 100%;
  background-color: inherit;
  border: 0 solid transparent;
  border-radius: 3rem 6rem 0 0;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.sub-title {
  font-size: 2.5rem;
  font-family: "Zain", sans-serif;
}

.section-container {
  position: relative;
  padding: 50px 20px;
  max-width: 1000px;
  margin: auto;
}

.about-content,
.contact-content {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}
.about-text,
.contact-text,
.contact-form {
  flex: 1;
  min-width: 280px;
}

.about-text p {
  margin-bottom: 1rem;
}

.about-blocks {
    display: flex;
    margin-top: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.about-blocks div {
  flex: 1;
  flex-basis: 300px;
}
#services {
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.service-card {
  display: flex;
  gap: 0.5rem;
  background: #222;
  padding: 1rem;
  border-radius: 12px;
  transition: transform 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
.service-card:hover {
  transform: translateY(-5px);
}
.service-card svg {
  width: 24px;
  height: 24px;
  fill: none;
}
.service-card h3 {
  margin-top: 0;
}

/* Highlighted service card (management panel) */
.service-card--highlight {
  border-color: #b472c4;
  box-shadow: 0 0 20px rgba(180, 114, 196, 0.25);
}

.card-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* -- Portfolio -- */

#portfolio {
  background-color: rgb(40, 40, 40);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 1.5rem;
}

.portfolio-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s;
  background: #222;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

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

.portfolio-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.portfolio-card .portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.portfolio-card .portfolio-overlay h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.portfolio-card .portfolio-overlay p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.portfolio-empty {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

/* -- Contact Us -- */

#contact {
  background-color: rgb(40, 40, 40);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

form input,
form textarea {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: none;
  border-radius: 8px;
  resize: none;
  border: 2px solid transparent;
  color: #000000;
  transition: border 0.3s, box-shadow 0.3s, background 0.3s, color 0.3s;
}

form input:focus,
form textarea:focus {
  outline: none;
  border: 2px solid #b472c4;
  background: rgba(180, 114, 196, 0.08);
  box-shadow: 0 0 8px 0 #b472c455;
  color: #ffffff;
}

form button {
  background: #b472c4;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.5s;
}

form button:hover {
  background: #9a5da8;
}

form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.contact-feedback {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  min-height: 1.4em;
}

.contact-feedback.success {
  color: #6fcf97;
}

.contact-feedback.error {
  color: #eb5757;
}

/* -- Footer -- */

footer {
  background: #000;
  padding: 30px 20px;
  text-align: center;
  font-size: 0.9em;
  color: #777;
}
footer a {
  color: #b472c4;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s;
}
footer a:hover {
  color: #fff;
}

/* Improve 404 text sizing on small screens */
@media (max-width: 768px) {
  .error-hero .title {
    font-size: clamp(3.5rem, 10vw, 5rem);
  }
  .error-hero .slogan {
    font-size: clamp(1.1rem, 3vw, 1.25rem);
  }
  .error-hero .lead {
    font-size: 1rem;
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .error-hero .title {
    font-size: clamp(3rem, 12vw, 4rem);
  }
  .error-hero .slogan {
    font-size: 1rem;
  }
  .error-hero .lead {
    font-size: 1rem;
    padding: 0 1rem;
  }
}
