/* 1. GLOBAL VARIABLES & RESET */
:root {
  --green: #006b24; /* GOKAME Green */
  --blue: #00c3ff; /* water blue */
  --accent: #e67e22; /* orange */
  --light: #f4f7f6; /* off-white */
  --dark: #222; /* dark grey */
  --grey: #444; /* medium grey */
  --legal-green: lightgreen; /* for legal pages "Matrix" theme */
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  margin: 0;
  padding: 0;
  padding-top: 60px;
  background-color: var(--dark);
}

a {
  color: var(--light);
  text-decoration: none;
  transition: 0.3s;
}

a:hover {
  text-decoration: none; /* Clean: No underline */
  color: #fff; /* brightens the text during glow */
  text-shadow: 0 0 10px rgba(0, 74, 153, 0.8), 0 0 20px rgba(0, 74, 153, 0.4);
  transform: scale(1.07); /* Makes the logo grow */
}

/* --- Mobile Nav Bar (Default) --- */
.main-nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: 60px;
  background: var(--dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  z-index: 1000;
  box-sizing: border-box;
  flex-wrap: wrap; /* Allows nav-links to drop to a new line */
}

.nav-call {
  font-size: 1.5rem;
}

.nav-hamburger {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
}

.nav-hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--light);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Transform hamburger into X */
.active .nav-hamburger span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.active .nav-hamburger span:nth-child(2) {
  opacity: 0;
}
.active .nav-hamburger span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-links {
  display: flex; /* stay flex to animate */
  flex-direction: column;
  position: absolute;
  left: -100%; /* Keeps it off-screen to the left */
  width: 100%;
  max-height: 0; /* Initially hide links */
  opacity: 0; /* Initially hide links */
  transition: max-height 0.5s ease-in-out, opacity 0.3s ease;
}

.nav-links.active {
  max-height: 500px; /* show links when active */
  opacity: 1; /* Make visible */
  position: absolute;
  top: 60px;
  left: 0;
  width: 75%;
  background: rgba(51, 51, 51, 0.98);
  border: 2px solid var(--green);
  border-top: none; /* Keep flush with the bar */
  border-bottom-right-radius: 8px;
  box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  margin: 0; /* Keeps nav to the top */
}

.nav-links li {
  margin: 10px 0; /* Adds vertical space between taps */
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  color: var(--green);
}

.logo a {
  transition: all 0.3s ease; /* Makes the glow fade in smoothly */
  display: inline-block;
}

header {
  position: relative;
  height: 60vh;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--light);
  background: linear-gradient(rgba(0, 45, 94, 0.7), rgba(0, 45, 94, 0.7)),
    url("/assets/MoHeader.jpg") left center / cover no-repeat;
}

header h1 {
  margin: 0;
  font-size: 3.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.tagline {
  font-size: 1.4rem;
  font-weight: 300;
  margin: 10px 0 20px;
  color: var(--accent);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* LAYOUT & CONTAINERS */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 15px;
}

.mission {
  background: var(--light);
  color: var(--dark);
  padding: 30px;
  border-radius: 12px;
  margin: -60px auto 40px;
  position: relative;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border-top: 5px solid var(--accent);
}

/* Contact Section */
#contact-form {
  max-width: 500px;
  margin: 30px auto;
  text-align: left;
}

.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  margin-bottom: 5px;
  color: white;
}
#contact-form input,
#contact-form select,
#contact-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  box-sizing: border-box;
}

.contact-box {
  text-align: center;
  padding: 20px 20px;
  background: #002d5e;
  color: white;
  border-radius: 10px;
  margin-top: 10px;
  margin-bottom: 30px;
}

/* ------ Services ------- */
.service-row {
  display: flex;
  flex-direction: column;
  grid-template-columns: 1fr 2fr;
  margin-bottom: 10px;
  background-color: var(--dark);
  border-radius: 12px;
  overflow: hidden;
}

.service-row:nth-child(even) {
  direction: rtl;
}

.service-row:nth-child(even) .service-card {
  direction: ltr;
}

.service-card {
  padding: 30px;
  background: var(--light);
  display: flex;
  flex-direction: column;
  justify-content: center;
  order: 2;
}

.service-card h3 {
  color: var(--green);
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.service-image {
  width: 100%;
  height: 230px;
  background-size: cover;
  background-position: center;
  order: 1;
  transition: transform 0.5s ease;
}

.service-row:hover .service-image {
  transform: scale(1.1);
}

/* Card Divider */
.card-divider {
  border: none;
  height: 1px;
  background: #eee;
  margin-bottom: 20px;
}

/* Service Images */
.service-ai {
  background-image: url("/assets/ai.jpg"); /* You can swap this for an AI image later */
}

.service-multimedia {
  background-image: url("/assets/tvWall.jpg");
}

.service-web {
  background-image: url("/assets/website.jpg");
}

.service-repair {
  background-image: url("/assets/turtlePc.jpg");
}

.service-commercial {
  background-image: url("/assets/dataCenter.jpg");
  background-position: center top;
}

/* 5. COMPONENTS (Buttons, Tags) */
.button-container {
  max-width: 250px; /* Limits the width of any button inside it */
  margin: 20px auto; /* Centers the container and adds vertical space */
}

.btn {
  background: var(--accent);
  color: white !important;
  padding: 15px 35px;
  border-radius: 50px;
  font-weight: bold;
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  font-size: 1.1rem;
  transition: transform 0.2s, background-color 0.2s;
  border: none;
  cursor: pointer;
}
.btn:hover {
  background-color: var(--green);
  transform: scale(1.05);
  color: white !important;
}

.area-tag {
  background: #222;
  color: white;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  margin-top: 50px;
}

footer {
  text-align: center;
  padding: 30px;
  font-size: 1rem;
  color: var(--light);
  background-color: var(--green);
  width: auto;
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--green);
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  opacity: 0; /* Hidden by default */
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--accent);
  transform: scale(1.1);
}

/* --- Matrix Theme for Sub-pages --- */
.matrix-theme {
  background-color: black;
  color: white;
  padding: 40px;
  border-radius: 12px;
  margin-top: 20px; /* Adds space below the navbar */
}

.matrix-theme,
.matrix-theme .mission,
.matrix-theme h1,
.matrix-theme h2,
.matrix-theme p {
  text-align: left !important;
  direction: ltr !important;
}

.matrix-theme h1,
.matrix-theme h2,
.matrix-theme h3,
.matrix-theme a:not(.btn) {
  color: var(--legal-green); /* Keeps GOKAME Matrix green links */
}

.thank-you-container {
  text-align: center;
  margin-top: 0;
  padding: 20px;
}
.thank-you-container h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}
.thank-you-container p {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.legal-body {
  background-color: black;
  color: white;
  max-width: 800px;
  margin: auto;
  padding: 40px;
}

.legal-body h1,
.legal-body h3,
.legal-body a {
  color: var(--legal-green);
}

.legal-body h1 {
  border-bottom: 2px solid #333;
}

/* --- Referrals Page Styling --- */
.legal-body .mission {
  color: var(
    --dark
  ); /* Makes the text readable inside the white mission boxes */
  text-align: left;
}

.legal-body .mission h3 {
  margin-top: 0;
  color: var(--green);
}

.legal-body .mission small {
  display: block;
  margin-top: 15px;
  font-weight: bold;
  color: var(--accent);
}

.footer-link-legal {
  margin-top: 40px;
  display: block;
  font-weight: bold;
  width: 100%;
}

/* About style */

.intro-row {
  display: flex;
  flex-direction: column;
  grid-template-columns: 1fr 2fr;
  margin-bottom: 10px;
  background-color: var(--dark);
  border: 1px solid var(--grey);
  border-radius: 12px;
  overflow: hidden;
}
.intro-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  order: 2;
  background: var(--dark);
  color: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border-top: 5px solid var(--green);
}

/* --- Responsive Styles --- */
/* --- for larger screens */
/* --- Desktop  --- */
@media (min-width: 888px) {
  body {
    padding-top: 0;
    padding-left: 200px; /* Left side sidebar */
  }

  .main-nav {
    width: 200px;
    box-sizing: border-box;
    overflow-x: hidden;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 40px;
    background: var(--dark);
    border-right: 1px solid var(--grey);
    border-bottom: none;
  }

  header {
    height: 90vh;
    min-height: auto;
  }

  .container {
    max-width: 800px;
  }

  /* Hide mobile icons on desktop */
  .nav-hamburger,
  .nav-call {
    display: none;
  }

  .nav-links {
    display: flex !important;
    max-height: none !important;
    position: static !important;
    width: 100%;
    padding: 0;
    opacity: 1 !important;
    border: none !important;
    box-shadow: none !important;
    margin-top: 20px;
  }

  .nav-links li a {
    text-align: left;
    padding: 12px 20px;
    width: 100%;
    display: block;
    box-sizing: border-box;
    border-bottom: 1px solid var(--grey);
    word-wrap: break-word;
    font-size: 0.95rem;
  }

  .nav-links li a:hover {
    padding-left: 30px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent);
  }

  .service-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    direction: ltr; /* Force default left-to-right */
    margin-bottom: 20px;
    background-color: var(--light);
  }

  .service-image {
    order: 0 !important; /* Resets the mobile 'order: 1' and 'order: 2' */
    width: 100%;
    min-height: 400px;
    display: block;
  }

  .service-card {
    order: 0 !important; /* Resets the mobile 'order: 1' and 'order: 2' */
    padding: 40px;
    background-color: var(--light) !important; /* Prevents see-through text */
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* zig-zag on desktop */
  .service-row:nth-child(even) {
    direction: rtl;
  }
  .service-row:nth-child(even) .service-card {
    direction: ltr;
  }

  .intro-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 0;
    margin-top: 40px;
    direction: rtl;
    margin-bottom: 20px;
    background-color: var(--dark);
    border: 1px solid var(--grey);
    border-radius: 12px;
    overflow: hidden;
    text-align: left;
  }

  .intro-card {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    direction: ltr !important;
    order: 1;
    background: transparent;
    color: white;
  }

  .intro-row .service-image {
    height: 100%;
    min-height: 450px;
    width: 100%;
    order: 2; /* Keeps image on the right */
    background-size: cover;
    background-position: center;
  }
}
