/* ==========================================================================
   CSS Reset
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
  --primary: #0f4c81;
  --secondary: #98ff98; /* Mint Green */
  --bg-color: #f8f9fa;
  --text-color: #333;
  --transition-speed: 0.3s ease;
  --white: #ffffff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   Typography & General Styles
   ========================================================================== */
h1, h2, h3, h4 {
  color: var(--primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: color var(--transition-speed);
}

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

/* ==========================================================================
   Layouts: Navigation (Flexbox)
   ========================================================================== */
header {
  position: sticky;
  top: 0;
  background-color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  box-shadow: var(--shadow);
  z-index: 1000;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
}

nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: var(--text-color);
  font-weight: 500;
}

nav a:hover {
  color: var(--primary);
}

/* ==========================================================================
   Layouts: Main Content & Grid Containers
   ========================================================================== */
main {
  flex: 1; /* Pushes footer to the bottom */
}

section {
  padding: 4rem 5%;
}

/* Reusable Grid for multi-column layouts (Services, Team, etc.) */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: start;
}

/* Two-column layout for About Section */
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* Standard Card Style */
.card {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform var(--transition-speed);
}

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

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label {
  font-weight: 600;
  color: var(--primary);
}

input, select, textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

/* ==========================================================================
   Interactivity: Buttons
   ========================================================================== */
button, 
.btn {
  display: inline-block;
  background-color: var(--primary);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--primary);
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  text-align: center;
  transition: all var(--transition-speed);
}

button:hover, 
.btn:hover {
  background-color: var(--white);
  color: var(--primary);
}

/* Secondary Button styling */
.btn-secondary {
  background-color: var(--secondary);
  border-color: var(--secondary);
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: var(--white);
  color: var(--text-color);
}

/* ==========================================================================
   Layouts: Footer (Flexbox)
   ========================================================================== */
footer {
  background-color: var(--primary);
  color: var(--white);
  padding: 3rem 5% 1rem 5%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-section {
  flex: 1;
  min-width: 250px;
}

.footer-section h4 {
  color: var(--secondary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

/* ==========================================================================
   Responsiveness (Media Queries)
   ========================================================================== */
@media (max-width: 768px) {
  /* Collapse navigation */
  header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Collapse explicit two-column layouts */
  .two-column {
    grid-template-columns: 1fr;
  }

  /* Adjust padding for sections */
  section {
    padding: 3rem 1rem;
  }

  /* Stack footer items */
  .footer-content {
    flex-direction: column;
  }
}
