/* Reset default margins and paddings */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Root CSS Variables for easy color scheme changes */
:root {
  --primary-color: #2c3e50; /* Dark blue-gray */
  --secondary-color: #3498db; /* Bright blue */
  --accent-color: #e74c3c; /* Red accent */
  --text-color: #333333; /* Dark gray text */
  --light-bg: #ecf0f1; /* Light gray background */
  --white: #ffffff;
  --footer-bg: #34495e; /* Darker gray-blue */
}

body {
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
}

/* App wrapper - full viewport height, flex column layout */
.app-wrapper {
  height: 100dvh; /* dvh = dynamic viewport height (accounts for mobile browser bars) */
  display: flex;
  flex-direction: column;
}

/* Header Styles */
header {
  height: 100px;
  background-color: var(--white);
  color: var(--white);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Logo container - groups logo and title together */
.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-right: 20px;
}

.logo {
  height: 60px; /* Adjust this to fit within the 100px header nicely */
  width: auto; /* Maintains aspect ratio */
}

header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0; /* Remove default margin */
}

/* Navigation Styles */
nav {
  display: flex;
  gap: 2rem;
}

/* Desktop navigation */
.desktop-nav {
  display: flex;
  gap: 2rem;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  background-color: transparent;
  font-size: 1.5rem;
  color: var(--white);
  font-family: Arial, sans-serif;
}

.mobile-menu-toggle:focus {
  outline: 2px solid var(--secondary-color);
  border-radius: 2px;
}

/* Hamburger icon styles removed - using emoji instead */

/* Mobile navigation menu */
.mobile-nav {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--primary-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  z-index: 99;
}

.mobile-nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  padding: 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  text-align: center;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background-color: var(--secondary-color);
}

/* Show mobile nav when active */
.mobile-nav.active {
  display: flex;
}

/* Hamburger animation removed - using emoji instead */

nav a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

nav a:hover {
  background-color: var(--light-bg);
}

nav a.active {
  background-color: var(--light-bg);
}

/* Main Content Area - grows to fill space */
main {
  flex-grow: 1;
  overflow-y: auto; /* Enables scrolling when content exceeds available space */
  background-color: var(--light-bg);
}

/* Content Container - limits width for readability */
.content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Footer Styles */
footer {
  height: 100px;
  background-color: var(--footer-bg);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4rem;
  flex-direction: row;
  gap: 0.5rem;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--secondary-color);
  text-decoration: none;
}

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

/* Typography Helpers */
h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 2rem;
}

h3 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Contact Form Modal Styles */
.contact-btn {
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 0.5rem;
}

.contact-btn:hover {
  background-color: #2980b9;
}

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

/* Modal Content */
.modal-content {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  text-align: center;
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-color);
  line-height: 1;
}

.modal-close:hover {
  color: var(--primary-color);
}

/* Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.form-group label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 2px solid #e1e8ed;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
}

.form-group textarea {
  resize: vertical;
}

.submit-btn {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 1rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background-color: #34495e;
}

.submit-btn:disabled {
  background-color: #bdc3c7;
  cursor: not-allowed;
}

/* Success Message */
.success-message {
  background-color: #27ae60;
  color: white;
  padding: 1rem;
  border-radius: 4px;
  text-align: center;
  margin-top: 1rem;
}

/* Form Error States */
.form-group input:invalid,
.form-group textarea:invalid {
  border-color: var(--accent-color);
}

.form-error {
  color: var(--accent-color);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Mobile Responsive Styles */
@media (max-width: 900px) {
  /* Hide desktop navigation on mobile */
  .desktop-nav {
    display: none;
  }

  /* Show mobile toggle button */
  .mobile-menu-toggle {
    display: block !important;
    font-size: 2rem !important;
    color: var(--primary-color) !important;
  }

  /* Adjust header for mobile with space-between */
  header {
    padding: 0 1rem;
    justify-content: space-between;
  }

  /* Scale down logo for mobile */
  .logo {
    height: 50px;
  }

  header h1 {
    font-size: 1.25rem;
  }

  /* Mobile content spacing */
  .content-container {
    padding: 2rem 1rem;
  }

  /* Mobile typography */
  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  footer {
    padding: 0 1rem;
  }

  /* Extra small screens */
  .logo-container {
    gap: 0.75rem;
  }

  .logo {
    height: 40px;
  }

  header h1 {
    font-size: 1.1rem;
  }

  .content-container {
    padding: 1.5rem 0.75rem;
  }
}
