/* Global Navigation and Color Scheme */

/* === COLOR VARIABLES === */
:root {
  /* Primary Colors */
  --primary-teal: #008080;
  --primary-light-teal: #32ffbe;
  --primary-accent: rgb(78, 255, 146);
  
  /* Secondary Colors */
  --secondary-dark: #35424a;
  --secondary-gray: #555;
  --secondary-light-gray: #888;
  
  /* Background Colors */
  --bg-primary: #fff;
  --bg-secondary: #f7f7f7;
  --bg-overlay: rgba(0, 0, 0, 0.5);
  
  /* Text Colors */
  --text-primary: #35424a;
  --text-secondary: #555;
  --text-light: #888;
  --text-white: #fff;
  
  /* Border Colors */
  --border-light: #ececec;
  --border-gray: #ccc;
  
  /* Shadow Colors */
  --shadow-light: rgba(53, 66, 74, 0.07);
  --shadow-medium: rgba(53, 66, 74, 0.10);
  --shadow-dark: rgba(0, 0, 0, 0.18);
  
  /* Gradients */
  --gradient-teal: linear-gradient(to right, rgba(232,73,29,0), var(--primary-light-teal) 30%, var(--primary-teal) 70%, rgba(232,73,29,0));
  
  /* Navigation Heights */
  --nav-height: 80px;
  --nav-mobile-height: 50px;
}

/* === GLOBAL NAVBAR STYLES === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #2638ff;
  box-shadow: 0 2px 10px var(--shadow-medium);
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.navbar-thirds {
  display: flex;
  width: 100%;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.navbar-third {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.navbar-third.left {
  justify-content: flex-start;
}

.navbar-third.center {
  flex: 0 0 auto;
  justify-content: center;
}

.navbar-third.right {
  justify-content: flex-end;
}

/* Logo Styles */
.navbar-third.center .logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
}

.navbar-third.center .logo img {
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 2px 8px var(--shadow-dark));
  transition: transform 0.3s ease;
  /* You can add max-height here if needed */
}

.navbar-third.center .logo img:hover {
  transform: scale(1.05);
}

/* Navigation Links */
.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 20px;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  color: var(--text-white);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 10px 15px;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: block;
}

.nav-links a:hover {
  color: var(--primary-light-teal);
  background-color: rgba(255, 255, 255, 0.1);
}

/* Fancy Underline Effect */
.fancy-underline {
  position: relative;
  overflow: hidden;
}

.fancy-underline::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--gradient-teal);
  transition: width 0.3s ease;
}

.fancy-underline:hover::after {
  width: 100%;
}

/* Dropdown Styles */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-primary);
  box-shadow: 0 4px 16px var(--shadow-medium);
  border-radius: 8px;
  padding: 10px 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 2000;
  list-style: none;
  margin: 0;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu a {
  padding: 12px 20px;
  color: var(--text-primary);
  border-radius: 0;
  display: block;
  transition: all 0.2s ease;
}

.dropdown-menu a:hover {
  background-color: var(--bg-secondary);
  color: var(--primary-teal);
}

/* Nested Dropdown */
.nested-dropdown {
  position: relative;
}

.nested-dropdown .dropdown-menu {
  top: 0;
  left: 100%;
  margin-left: 5px;
}

/* Mobile Menu Styles */
.hamburger-menu {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.hamburger-menu span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 998;
}

.mobile-nav-overlay.show {
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--bg-primary);
  box-shadow: -2px 0 10px var(--shadow-medium);
  transition: right 0.3s ease;
  z-index: 999;
  overflow-y: auto;
  padding-top: var(--nav-height);
}

.mobile-nav.open {
  right: 0;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 20px 0;
}

.mobile-nav li {
  margin: 0;
}

.mobile-nav a {
  color: var(--text-primary);
  text-decoration: none;
  padding: 15px 25px;
  display: block;
  border-bottom: 1px solid var(--border-light);
  transition: all 0.2s ease;
}

.mobile-nav a:hover {
  background: var(--bg-secondary);
  color: var(--primary-teal);
}

.mobile-nav .dropdown-toggle::after {
  content: ' ▼';
  float: right;
  transition: transform 0.3s ease;
}

.mobile-nav .dropdown.open .dropdown-toggle::after {
  transform: rotate(180deg);
}

.mobile-nav .dropdown-menu {
  position: static;
  box-shadow: none;
  background: var(--bg-secondary);
  opacity: 1;
  visibility: visible;
  transform: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  border-radius: 0;
  padding: 0;
}

.mobile-nav .dropdown.open .dropdown-menu {
  max-height: 300px;
  padding: 10px 0;
}

.mobile-nav .dropdown-menu a {
  padding-left: 45px;
  font-size: 0.9rem;
}

/* Global Search Bar Styles */
.global-search-container {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
}

.global-search-form {
  display: flex;
  background: var(--bg-primary);
  border: 2px solid var(--border-light);
  border-radius: 25px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.global-search-form:focus-within {
  border-color: var(--primary-teal);
}

.global-search-input {
  flex: 1;
  padding: 12px 20px;
  border: none;
  outline: none;
  font-size: 1rem;
  background: transparent;
}

.global-search-button {
  background: var(--primary-teal);
  color: var(--text-white);
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.global-search-button:hover {
  background: var(--primary-light-teal);
}

/* Page Content Spacing */
.main-content {
  margin-top: var(--nav-height);
  min-height: calc(100vh - var(--nav-height));
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar {
    height: var(--nav-mobile-height);
    padding: 0 15px;
  }
  
  .navbar-thirds {
    justify-content: space-between;
  }
  
  .navbar-third.left,
  .navbar-third.right {
    display: none;
  }
  
  .navbar-third.center {
    flex: 1;
  }
  
  .hamburger-menu {
    display: flex;
  }
  
  .main-content {
    margin-top: var(--nav-mobile-height);
  }
  
  .global-search-container {
    max-width: 100%;
    padding: 0 15px;
  }
  
  /* Hero section mobile spacing */
  .hero-section {
    padding-top: 80px;
  }
  
  .hero-text,
  .hero-overlay {
    margin-top: 60px;
  }
  
  .straight-heading {
    margin-top: 50px;
  }
  
  /* Keep search bar positioned properly */
  .search-bar-container {
    margin-top: -40px !important;
    position: relative;
    z-index: 100;
    overflow: hidden;
    box-sizing: border-box;
  }
  
  .search-form {
    display: flex !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  
  .search-input {
    flex: 1 !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }
  
  .search-button {
    flex-shrink: 0 !important;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .mobile-nav {
    width: 100%;
    right: -100%;
  }
}

/* Button Styles */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: var(--primary-teal);
  color: var(--text-white);
}

.btn-primary:hover {
  background: var(--primary-light-teal);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--primary-teal);
  color: var(--text-white);
  border-color: var(--primary-teal);
}

.btn-outline {
  background: transparent;
  color: var(--primary-teal);
  border: 2px solid var(--primary-teal);
}

.btn-outline:hover {
  background: var(--primary-teal);
  color: var(--text-white);
}

/* Card Styles */
.card {
  background: var(--bg-primary);
  border-radius: 10px;
  box-shadow: 0 2px 8px var(--shadow-light);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px var(--shadow-medium);
}

.card-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 15px 20px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border-light);
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-teal);
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border-light);
  border-radius: 50%;
  border-top-color: var(--primary-teal);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary-teal); }
.text-secondary { color: var(--text-secondary); }
.text-light { color: var(--text-light); }

.bg-primary { background: var(--bg-primary); }
.bg-secondary { background: var(--bg-secondary); }

.m-0 { margin: 0; }
.p-0 { padding: 0; }
.mt-1 { margin-top: 10px; }
.mb-1 { margin-bottom: 10px; }
.pt-1 { padding-top: 10px; }
.pb-1 { padding-bottom: 10px; }

.hidden { display: none; }
.visible { display: block; }

/* Print Styles */
@media print {
  .navbar,
  .mobile-nav,
  .mobile-nav-overlay,
  .hamburger-menu {
    display: none !important;
  }
  
  .main-content {
    margin-top: 0 !important;
  }
}
