/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', 'Open Sans', 'Lato', sans-serif;
}

/* Base body & layout with sticky footer */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  background-color: #FFFFFF; /* main content white background */
  color: #1A1F71; /* Deep Blue primary text */
  line-height: 1.6;
}

body {
  flex-direction: column;
  min-height: 100vh; /* full viewport height */
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2rem;
}

/* Optional: center content vertically on short pages */
.main-content.center-content {
  justify-content: center;
}

/* Header & Navigation */
header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: #1A1F71;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #3399FF;
  text-decoration: none;
}

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

.nav-links li a {
  color: #FFFFFF;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.nav-links li a:hover {
  color: #3399FF;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Profile when logged in */
.logged-in #userProfile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.nav-right a {
  padding: 8px 14px;
  border-radius: 5px;
  background-color: #3399FF;
  color: #FFFFFF;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s, transform 0.2s;
}

.nav-right a:hover {
  background-color: #267ACC;
  transform: translateY(-2px);
}

/* Auth modal */
.auth-modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-modal-content {
  background-color: #FFFFFF;
  padding: 2rem;
  border-radius: 10px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  position: relative;
}

.auth-modal-content h2 {
  margin-bottom: 1rem;
  color: #1A1F71;
  text-align: center;
}

.auth-modal-content input,
.auth-modal-content select {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border-radius: 5px;
  border: 1px solid #CCCCCC;
}

.auth-modal-content button {
  width: 100%;
  padding: 0.75rem;
  background-color: #3399FF;
  color: #FFFFFF;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.auth-modal-content button:hover {
  background-color: #267ACC;
}

.auth-modal-content .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}

.auth-modal-content p {
  text-align: center;
  font-size: 0.9rem;
}

.auth-modal-content a {
  color: #3399FF;
  text-decoration: none;
}

.auth-modal-content a:hover {
  text-decoration: underline;
}

/* Hide login/register when user is logged in (JS handles this) */
.logged-in #loginBtn,
.logged-in #registerBtn {
  display: none;
}

/* Responsive for mobile */
@media screen and (max-width: 768px) {
  header nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-left {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-right {
    margin-top: 10px;
    width: 100%;
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .nav-right a, .logged-in #userGreeting {
    width: auto;
  }

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

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #1A1F71 0%, #FFFFFF 100%);
  color: #FFFFFF;
  text-align: center;
  min-height: calc(100vh - 80px);
  padding: 2rem;
  position: relative;
  z-index: 1;
}

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

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* Call-to-action buttons */
.cta-button {
  background: #3399FF;
  color: #FFFFFF;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s;
}

.cta-button:hover {
  background-color: #267ACC;
}

/* Sections */
section {
  padding: 4rem 2rem;
  background-color: #FFFFFF;
}

section.alt-bg {
  background-color: #F2F2F2;
}

section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #1A1F71;
}

/* Cards */
.service-card, .project-card {
  background-color: #F2F2F2;
  padding: 1.5rem;
  margin: 1rem auto;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.project-card img {
  width: 100%;
  border-radius: 5px;
  margin-bottom: 1rem;
}

/* Profile pictures */
.profile-pic {
  display: block;
  margin: 2rem auto;
  max-width: 200px;
  border-radius: 50%;
}

/* Forms */
form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input, textarea, select {
  padding: 0.75rem;
  border-radius: 5px;
  border: 1px solid #CCCCCC;
}

input:focus, textarea:focus, select:focus {
  outline: 2px solid #3399FF;
}

/* Buttons */
button {
  background-color: #3399FF;
  color: #FFFFFF;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

button:hover {
  background-color: #267ACC;
}

/* Success & Warning messages */
.success {
  color: #27AE60;
}

.warning {
  color: #F2994A;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  background-color: #4B4B4B;
  color: #FFFFFF;
  margin-top: auto;
}

/* Footer links (if any) */
footer a {
  color: #3399FF;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}
