/* --- Layout & Typography Improvements --- */

body {
  font-family: 'Inter', sans-serif;
  background: #f9fafb;
  color: #222;
  line-height: 1.65;
  margin: 0;
  padding: 0;
}

header {
  background-color: #004d40; /* Dark teal */
  color: #e0f2f1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-weight: 700;
  letter-spacing: 1.2px;
}

header p {
  font-style: italic;
  color: #b2dfdb;
}

nav {
  background-color: #00796b;
  display: flex;
  justify-content: center;
  padding: 0.7rem 0;
  box-shadow: inset 0 -3px 6px rgba(0,0,0,0.15);
}

nav a {
  color: #e0f2f1;
  text-decoration: none;
  margin: 0 1.5rem;
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
  font-size: 1.1rem;
}

nav a:hover,
nav a.active {
  background-color: #004d40;
  color: #a7ffeb;
  box-shadow: 0 2px 8px rgba(0, 77, 64, 0.7);
}

.container {
  max-width: 960px;
  margin: 2.5rem auto;
  margin-top: 0.25rem !important;
  padding: 0 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.1);
}

.container h2 {
  font-weight: 700;
  color: #004d40;
  margin-bottom: 1rem;
  border-bottom: 3px solid #00796b;
  padding-bottom: 0.3rem;
}

.container h3 {
  color: #00796b;
  margin-top: 2rem;
}

.container p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: #333;
}

footer {
  text-align: center;
  padding: 1rem;
  background: #004d40;
  color: #b2dfdb;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  margin-top: 3rem;
  user-select: none;
}

/* --- Form Styling on Contact Page --- */

form label {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
  color: #004d40;
}

form input[type="text"],
form input[type="email"],
form textarea {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.3rem;
  border: 1.5px solid #00796b;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form textarea:focus {
  outline: none;
  border-color: #004d40;
  box-shadow: 0 0 5px #00796b;
}

form button {
  margin-top: 1.5rem;
  background-color: #00796b;
  color: white;
  border: none;
  padding: 0.7rem 1.6rem;
  font-size: 1.1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: 700;
}

form button:hover {
  background-color: #004d40;
}

/* --- Responsive tweaks --- */

@media (max-width: 720px) {
  header div {
    flex-direction: column;
    text-align: center;
  }
  header img {
    margin: 1rem 0;
    height: 90px;
  }
  nav {
    flex-direction: column;
  }
  nav a {
    margin: 0.5rem 0;
  }
}

@keyframes slideInUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.image-tile {
  opacity: 0;
  animation-name: slideInUp;
  animation-duration: 0.9s;
  animation-fill-mode: forwards;
  animation-timing-function: ease-out;
}

html {
  scroll-behavior: smooth;
}

.header-title h1 {
  font-family: 'Inter', sans-serif;
}

.team-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.team-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #0077b5;
  text-decoration: underline;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.team-links a:hover {
  text-decoration: none;
  color: #005580;
}

.team-links i.fab.fa-linkedin {
  font-size: 1.1rem;
}

.partner-logos-section {
  padding-bottom: 0.5rem;   /* Reduce bottom spacing of partner section */
  margin-bottom: 2rem;         /* Remove any margin if present */
}

footer {
  margin-top: 0;            /* Remove extra space above footer */
  margin-bottom: 0;
  padding-top: 0.5rem;      /* Adjust as needed */
  padding-bottom: 0.25rem;
}

.nav-tiles {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.5rem auto 1rem auto;
  max-width: 100vw;
  width: 100%;
  box-sizing: border-box;
}

.image-tile {
  flex: 1 1 20%;
  height: 216px;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  color: white;
  text-align: center;
  font-size: 1.4rem;
  font-weight: bold;
  line-height: 216px;
  background-blend-mode: multiply;
  background-color: rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

/* Per-page backgrounds */
.image-tile.home     { background-image: url("../media/bluegreen.png"); }
.image-tile.services { background-image: url("../media/drop2.jpg"); }
.image-tile.about    { background-image: url("../media/analyse.jpg"); }
.image-tile.contact  { background-image: url("../media/dashboard.jpg"); }

/* Hover effect (applies to both active & inactive) */
.image-tile:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
  filter: brightness(1.15);
}

/* ACTIVE PAGE tile */
.image-tile.active {
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
  filter: grayscale(40%);
  text-decoration: underline;
  background-color: rgba(0, 0, 0, 0.5); /* stronger darken */
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease, text-decoration 0.3s ease;
}

/* ACTIVE PAGE tile hover override */
.image-tile.active:hover {
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.9);
  filter: grayscale(40%);
  transform: scale(1.1);
}

@media (max-width: 720px) {
  .nav-tiles {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .image-tile {
    flex: 1 1 44%;        /* Slightly narrower for spacing */
    height: 130px;        /* Taller than before */
    line-height: 130px;
    font-size: 1.1rem;
  }
}
