/* Basic Reset & Shared Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  display: flex;
  flex-direction: column;
  background-color: #f4f4f4;
  color: #333;
}

/* --- Main Navigation Bar --- */
nav {
  background-color: #13678a;
  padding: 0.5rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 100;
  border-bottom: 2px solid #45b69c;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.logo-img-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.8);
  background-color: #1a252f;
}
.logo-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.logo-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.logo-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.1;
  letter-spacing: 0.5px;
}
.logo-subtitle {
  color: #8ee4af;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.nav-links a,
.nav-links button {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links button:hover {
  color: #8ee4af;
}
.nav-divider {
  color: rgba(255, 255, 255, 0.4);
  user-select: none;
}
.social-nav {
  display: flex;
  gap: 0.25rem;
}
nav .mobile-only-link {
  display: none;
}
.mobile-menu-btn {
  display: none;
  color: white;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* --- Footer --- */
footer {
  background-color: #0d4c63;
  color: #bdc3c7;
  padding: 0.75rem 1.5rem;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  border-top: 1px solid #13678a;
  position: sticky;
  bottom: 0;
  z-index: 50;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.15);
}
.footer-contact,
.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
footer a {
  color: #8ee4af;
  text-decoration: none;
  margin: 0 0.5rem;
}
footer a:hover {
  color: #ffffff;
}
.footer-socials a {
  font-size: 1.1rem;
  margin: 0 0.3rem;
  color: #bdc3c7;
}
.footer-socials a:hover {
  color: #8ee4af;
}

/* --- Responsive Breakpoint (1100px Unified) --- */
@media (max-width: 1100px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #13678a;
    padding: 0.5rem 0; /* Reduced from 1.5rem to shrink overall menu height */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    border-bottom: 2px solid #45b69c;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a,
  .nav-links button {
    padding: 0.4rem; /* Reduced from 0.75rem to bring links closer together */
    font-size: 1.05rem;
  }

  .nav-divider {
    display: none;
  }

  nav .mobile-only-link {
    display: flex;
    margin-top: 0.25rem; /* Reduced from 0.5rem */
  }

  .mobile-terms-row.mobile-only-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    text-align: center;
  }

  /* Allow mobile footer to show initially, with a smooth fade-out class */
  footer {
    transition: opacity 0.5s ease-out;
  }

  footer.mobile-hidden {
    opacity: 0;
    pointer-events: none;
  }
}

/* --- Cookie Consent Banner & Modal --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #0d4c63;
  color: #ffffff;
  border-top: 2px solid #45b69c;
  z-index: 99999;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.25);
  font-family: inherit;
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cookie-text {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #e0e0e0;
}

.cookie-text a {
  color: #8ee4af;
  text-decoration: underline;
  font-weight: 600;
}

.cookie-text a:hover {
  color: #ffffff;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 0.2s,
    transform 0.1s,
    border-color 0.2s;
}

.cookie-btn-accept {
  background-color: #45b69c;
  color: #ffffff;
  border: 1px solid #45b69c;
}

.cookie-btn-accept:hover {
  background-color: #3aa38b;
  transform: translateY(-1px);
}

.cookie-btn-reject {
  background-color: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.cookie-btn-reject:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #ffffff;
}

.cookie-btn-manage {
  background-color: transparent;
  color: #8ee4af;
  border: none;
  text-decoration: underline;
  padding: 0.55rem 0.5rem;
}

.cookie-btn-manage:hover {
  color: #ffffff;
}

/* Modal Overlay */
.cookie-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cookie-modal-card {
  background-color: #ffffff;
  border-radius: 10px;
  width: 100%;
  max-width: 540px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

.cookie-modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cookie-modal-header h3 {
  color: #13678a;
  font-size: 1.2rem;
  margin: 0;
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #7f8c8d;
}

.cookie-modal-close:hover {
  color: #e74c3c;
}

.cookie-modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cookie-modal-desc {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.cookie-category {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
}

.cookie-cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.cookie-cat-header strong {
  color: #13678a;
  font-size: 0.95rem;
}

.cookie-badge {
  font-size: 0.7rem;
  background-color: #e2f0d9;
  color: #385723;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  font-weight: 600;
}

.cookie-cat-desc {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.4;
  margin: 0;
}

.cookie-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  background-color: #fcfcfc;
}

/* Custom Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.2s;
  border-radius: 24px;
}

.toggle-switch .slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

.toggle-switch input:checked + .slider {
  background-color: #45b69c;
}

.toggle-switch input:checked + .slider:before {
  transform: translateX(20px);
}

.toggle-switch.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.toggle-switch.disabled .slider {
  cursor: not-allowed;
}

/* Responsive banner layout for mobile screens */
@media (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
  }
  .cookie-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .cookie-btn {
    flex: 1 1 auto;
    text-align: center;
  }
  .cookie-btn-manage {
    width: 100%;
    order: 3;
    padding-top: 0.3rem;
  }
}
