@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Magz:wght@400;700&display=swap');

body.light-theme {
  --primary-color: #003049; /* Primary color */
  --secondary-color: #333333;

  --background-color : #ffffff; /* Background color */
  --text-color: #222222; /* Text color */
  
  --hero-background-color: var(--primary-color); /* Light theme hero background */
  --hero-overlay-background-color: rgba(0, 0, 0, 0.5); /* Light theme hero overlay background */
  --hero-banner-title: #ffffff; /* Light theme hero banner title color */
  --hero-banner-content: #ffffff; /* Light theme hero banner content color */
  
  --nav-background-color: var(--primary-color); /* Light theme nav background */
  --nav-text-color: var(--text-color); /* Light theme nav text color */
  
  --button-hover-background-color: #f0f0f0; /* Button hover background color */
  --link-color: var(--primary-color); /* Link color */
  
  --footer-background-color: var(--background-color); /* Light theme footer background */
  --footer-text-color: var(--text-color); /* Light theme footer text color */
  
}

html, body {
  height: 100%; /* Ensure html and body take full viewport height */
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  background-color: var(--background-color); /* Use CSS variable */
  font-family: 'Roboto', sans-serif; /* Use Google Font */
  color: var(--primary-color); /* Use CSS variable */
  min-height: 100vh; /* Ensure body takes at least full viewport height */
  box-sizing: border-box; /* Include padding in height calculation */
}

nav {
  width: 100%;
  background-color: var(--nav-background-color); /* Match footer background */
  padding: 10px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Add space between logo and menu */
  box-sizing: border-box; /* Include padding in width calculation */
  position: fixed; /* Fix the nav-bar at the top */
  top: 0; /* Position at the top */
  left: 0; /* Align to the left */
  z-index: 1000; /* Ensure it is above other elements */
}

nav a {
  display: flex;
  align-items: center; /* Center logo and text vertically */
}

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

nav .logo-text {
  font-size: 1.5em;
  margin-left: 10px; /* Add some space between the logo and the text */
  display: flex;
  align-items: center; /* Center text vertically */
}

nav .nav-menu a {
  text-transform: uppercase; /* Make menu items uppercase */
  color: var(--nav-text-color); /* Use theme variable for text color */
  text-decoration: none; /* Remove underline */
  margin-left: 20px; /* Add some space between menu items */
}

.nav-button {
  background-color: var(--primary-color); /* Use primary color */
  color: var(--background-color) !important; /* Use background color for text */
  font-weight: bold; /* Bold text */
  padding: 10px 20px; /* Padding for button */
  border: 2px solid var(--background-color); /* Add border with background color */
  border-radius: 5px; /* Rounded corners */
  text-decoration: none; /* Remove underline */
  text-align: center; /* Center text */
}

.nav-button:hover {
  background-color: var(--background-color); /* Use background color for background on hover */
  color: var(--primary-color) !important; /* Use primary color for text on hover */
  border: 2px solid var(--primary-color); /* Outline the button with primary color */
}

.hero-banner,
.banner {
  margin-top: 60px; /* Adjust margin to account for fixed nav-bar height */
  background-color: var(--hero-background-color); /* Use the same background color */
  background-image: url('img/hero-banner.png'); /* Add background image */
  background-size: cover; /* Cover the entire container */
  background-position: bottom; /* Always show the bottom of the picture */
}

.hero-banner {
  width: 100%;
  position: relative;
  padding: 60px 0 50px; /* Reduce top padding to move content closer to the top */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column; /* Change to column layout */
  height: 500px; /* Always 500px tall */
}

.hero-banner a {
  display: inline-block;
  background-color: var(--background-color);
  color: var(--primary-color);
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  text-align: center;
}

.hero-banner a:hover {
  background-color: var(--button-hover-background-color);
}

.hero-content {
  display: flex;
  flex-direction: column; /* Change to column layout */
  justify-content: space-between;
  align-items: center; /* Center items horizontally */
  width: 80%;
  z-index: 2; /* Ensure content is above overlay */
  text-align: center; /* Center text */
}

.hero-empty {
  flex: 1;
}

.hero-text-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%; /* Force uniform width */
  max-width: 600px; /* Set a maximum width */
}

.hero-text-form h1 {
  margin: 0;
  color: var(--hero-banner-title); /* Use white color for text */
  font-size: 1.5em; /* Reduce font size */
  width: 100%; /* Force uniform width */
}

.hero-text-form p {
  color: var(--hero-banner-content); /* Use white color for text */
  font-size: 1.2em; /* Revert font size */
  margin-bottom: 20px;
  width: 100%; /* Force uniform width */
}

.hero-text-form input,
.hero-text-form button {
  font-size: 0.75em; /* Reduce font size by 25% */
  padding: 10px; /* Adjust padding for smaller size */
}

.hero-text-form button {
  display: block;
  margin: 10px auto 0; /* Center button horizontally */
}

.technologies-section {
  width: 100%;
  background-color: var(--background-color); /* Use white background */
  padding: 20px 0; /* Reduce padding */
  text-align: center;
}

.technologies-section h2 {
  color: var(--primary-color); /* Use dark color for text */
  font-size: 1.5em; /* Reduce font size */
  margin-bottom: 20px;
}

.technologies-logos {
  display: flex;
  justify-content: space-around; /* Space logos out evenly */
  gap: 20px;
  flex-wrap: nowrap; /* Ensure logos are in a single row */
  overflow-x: auto; /* Allow horizontal scrolling if needed */
}

.technologies-logos img {
  height: 30px; /* Set height to 30px */
  width: auto; /* Maintain aspect ratio */
  transition: transform 0.3s ease; /* Smooth transition for scaling */
}

.technologies-logos img:hover {
  transform: scale(1.1); /* Scale up slightly on hover */
}

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

.description {
  color: var(--primary-color); /* Use CSS variable */
  font-style: italic;
  text-align: center;
  margin-top: 20px;
}

.logo {
  width: 150px; /* Standard logo width */
  height: auto;
  margin-top: 10px; /* Reduce margin-top */
}

.main-content {
  flex-grow: 1; /* Push footer to the bottom */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Align content to the top */
  align-items: center;
  width: 100%; /* Prevent horizontal overflow */
  overflow-y: visible; /* Ensure all cards are visible */
  padding: 25px 40px 0; /* Add top padding of 25px and horizontal padding of 40px */
  box-sizing: border-box; /* Include padding in width calculation */
  background-color: var(--background-color); /* Set background to white */
}

.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px; /* Space between cards */
  justify-content: center; /* Center the cards */
  padding: 20px;
}

.card {
  background-color: var(--background-color); /* White background */
  color: var(--text-color); /* Dark text color */
  border: none; /* Remove border */
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  width: calc(25% - 20px); /* 4 cards per row with gap */
  box-sizing: border-box; /* Include padding in width calculation */
  text-align: center;
  position: relative; /* Enable positioning of child elements */
  display: flex;
  flex-direction: column; /* Use flex column layout */
  justify-content: flex-start; /* Align content to the top */
  gap: 0; /* Remove space between elements */
  height: auto; /* Allow height to shrink to content */
  overflow: hidden; /* Hide overflow */
}

.card .read-more {
  margin-top: auto; /* Push the link to the bottom */
  margin-bottom: 10px; /* Add a small margin at the bottom */
  margin-top: 10px; /* Add a small margin at the top */
}

.card-header-image-container {
  width: 100%;
  height: 200px; /* Allow height to adjust based on content */
  overflow: hidden; /* Hide overflow */
  border-radius: 8px 8px 0 0; /* Rounded corners for top */
  display: flex; /* Use flexbox */
  justify-content: center; /* Center the image horizontally */
  align-items: center; /* Center the image vertically */
  margin-bottom: 5px; /* Reduce space between image and content */
}

.card-header-image {
  width: 100%; /* Stretch to the width of the container */
  height: auto; /* Maintain aspect ratio */
  object-fit: cover; /* Cover the entire container */
}

.card-content-container {
  padding: 10px; /* Add small padding */
  margin-top: 0; /* Remove top margin */
  height: auto; /* Height only tall enough for the content */
}

.card-content-container h3 {
  margin-top: 0; /* Remove top margin */
  padding-top: 10px; /* Add 10px padding to the top */
}

.card-content-container h3 {
  margin-top: 0; /* Remove top margin */
  padding-top: 10px; /* Add 10px padding to the top */
}

.card-title {
  margin-top: 0; /* Remove top margin */
}

footer {
  text-align: center;
  width: 100%;
  background-color: var(--footer-background-color); /* Match background color */
  color: var(--footer-text-color); /* Match text color */
  margin-top: 20px; /* Add margin-top to footer */
  box-sizing: border-box; /* Include padding in width calculation */
  border-top: 1px solid rgba(255, 255, 255, 0.2); /* Add faint top border line */
}

footer h1, footer h2, footer h3, footer h4, footer h5, footer h6 {
  color: var(--footer-text-color); /* Match footer text color */
}

a {
  color: var(--link-color); /* Use link color */
  text-decoration: none; /* Remove underline */
}

a:hover {
  text-decoration: underline; /* Underline on hover */
}

.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1001; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
  background-color: var(--background-color);
  margin: 15% auto; /* 15% from the top and centered */
  padding: 20px;
  border: 1px solid #888;
  width: 80%; /* Could be more or less, depending on screen size */
  max-width: 600px; /* Maximum width */
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  border-radius: 10px;
}

.close {
  color: var(--text-color);
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

/* Responsive design */
@media (max-width: 1200px) {
  .card {
    width: calc(33.33% - 20px); /* 3 cards per row with gap */
  }
}

@media (max-width: 768px) {
  .description {
    font-size: 14px;
  }

  .hero-content {
    flex-direction: column;
    align-items: center;
  }

  .hero-text-form {
    padding-right: 0;
    text-align: center;
  }

  .hero-form {
    margin-top: 20px;
  }

  .card {
    width: calc(50% - 20px); /* 2 cards per row with gap */
  }
}

@media (max-width: 480px) {
  .description {
    font-size: 12px;
  }

  .card {
    width: calc(100% - 20px); /* 1 card per row with gap */
  }
}

h1, h2, h3, h4, h5, h6 {
  text-transform: uppercase; /* Make all headers uppercase */
  color: var(--text-color); /* Use --text-color as primary color */
}
