/* Chrome Elements: Header, Footer, Menu Drawer, Share Button */

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 40px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  pointer-events: none;
  transition: background 0.3s ease, padding 0.3s ease;
}

.site-header.scrolled {
  background: var(--deep-space);
  padding: 20px var(--gutter);
}

.site-header.scrolled.dark-mode {
  background: var(--ghost-white);
}

.site-header > * {
  pointer-events: auto; /* Re-enable clicks for actual elements */
}

.logo img {
  height: 40px;
  display: block;
}

.hamburger {
  width: 30px;
  height: 20px; /* 3 lines (2px each) + 2 gaps (4px each) = 14px approx, adjusting to 20 for click area */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: white;
  transition: transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
}

/* Header Inversion */
.site-header.dark-mode .logo img {
  filter: url(#deep-space-logo);
}

.site-header.dark-mode .hamburger span {
  background-color: var(--deep-space);
}

/* Menu Drawer */
.menu-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease-out, visibility 300ms ease-out;
}

.menu-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.menu-drawer {
  position: fixed;
  top: 0;
  right: -480px;
  width: 480px;
  height: 100vh;
  background-color: var(--deep-space);
  z-index: 201;
  padding: 60px;
  display: flex;
  flex-direction: column;
  transition: right 300ms ease-out;
  overflow-y: auto;
}

.menu-drawer.active {
  right: 0;
}

.drawer-close {
  position: absolute;
  top: 40px;
  right: var(--gutter);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-close span {
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--ghost-white);
}

.drawer-close span:first-child { transform: rotate(45deg); }
.drawer-close span:last-child { transform: rotate(-45deg); }

.drawer-top {
  margin-bottom: 60px;
  margin-top: 20px;
}

.privacy-link {
  color: var(--ghost-white);
  font-size: 14px;
  text-decoration: none;
  opacity: 0.7;
}

.privacy-link:hover { opacity: 1; }

.drawer-middle {
  flex-grow: 1;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.nav-link {
  color: var(--ghost-white);
  font-size: 28px;
  font-weight: 700;
}

.sub-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 20px;
}

.sub-nav-link {
  color: var(--ghost-white);
  font-size: 16px;
  font-weight: 400;
  opacity: 0.7;
}

.sub-nav-link:hover { opacity: 1; }

.drawer-bottom {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lang-picker select {
  background: none;
  border: none;
  color: var(--ghost-white);
  font-size: 14px;
  outline: none;
  cursor: pointer;
}

.newsletter input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(247, 247, 255, 0.3);
  color: var(--ghost-white);
  padding: 10px 0;
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
}

.newsletter input:focus {
  outline: none;
  border-bottom-color: var(--ghost-white);
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  color: var(--ghost-white);
  font-size: 14px;
  opacity: 0.7;
}
.social-links a:hover { opacity: 1; }

/* Share Button */
.share-widget {
  position: fixed;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 15px;
}

.share-toggle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ghost-white); /* using SVG inline stroke later */
}

.share-toggle svg {
  width: 24px;
  height: 24px;
  stroke: var(--ghost-white);
  stroke-width: 2;
  fill: none;
}

.share-options {
  display: flex;
  gap: 15px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.share-widget.active .share-options {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ghost-white);
  border: 1px solid rgba(255,255,255,0.2);
  transition: background 0.3s;
}

.share-btn:hover { background: rgba(255,255,255,0.1); }

/* Footer Bar */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 90;
  pointer-events: none;
}

.site-footer > * { pointer-events: auto; }

.footer-lang { color: var(--ghost-white); font-size: 14px; }
.footer-socials { display: flex; gap: 20px; }
.footer-socials a { color: var(--ghost-white); font-size: 14px; opacity: 0.7; }
.footer-socials a:hover { opacity: 1; }

/* Mobile Chrome Tweaks */
@media (max-width: 768px) {
  .site-header { padding: 20px; }
  .site-footer { padding: 20px; }
  .menu-drawer {
    width: 100%;
    right: -100%;
    padding: 30px;
  }
}
