/* === SHARED COMPONENTS === */
/* Navigation, hamburger, drawer, and footer styles */
/* Used via: <link rel="stylesheet" href="/shared/components.css"> */

/* === NAVIGATION === */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

nav[data-theme="dark"] {
  background: rgba(10, 11, 15, 0.8);
}

nav[data-theme="light"] {
  background: rgba(250, 250, 248, 0.85);
}

.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 72px; width: auto; }

.nav-links { display: flex; gap: 2rem; align-items: center; margin-left: auto; }
.nav-links a:not(.nav-phone) { display: none; }

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-links a:hover { color: var(--text); }

/* === PHONE NUMBER === */
.nav-phone {
  font-family: 'Space Mono', monospace !important;
  font-size: 1rem !important;
  letter-spacing: 0.08em !important;
  text-transform: none !important;
  position: relative;
}

nav[data-theme="dark"] .nav-phone {
  color: #00d4aa !important;
}

nav[data-theme="light"] .nav-phone {
  color: #00a884 !important;
}

nav[data-theme="dark"] .nav-phone::before {
  content: '';
  display: inline-block;
  width: 1em; height: 1em;
  margin-right: 0.4rem;
  vertical-align: -0.1em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300d4aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") no-repeat center / contain;
}

nav[data-theme="light"] .nav-phone::before {
  content: '';
  display: inline-block;
  width: 1em; height: 1em;
  margin-right: 0.4rem;
  vertical-align: -0.1em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300a884' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") no-repeat center / contain;
}

nav[data-theme="dark"] .nav-phone:hover {
  text-shadow: 0 0 12px rgba(0, 212, 170, 0.15);
}

nav[data-theme="light"] .nav-phone:hover {
  opacity: 0.7;
}

/* === NAV RIGHT + HAMBURGER === */
.nav-right { display: flex; align-items: center; }
.nav-phone-icon { display: none; }

.nav-hamburger {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 24px;
  position: relative;
  z-index: 110;
  padding: 0;
}

.nav-hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  margin-left: auto;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: absolute;
  right: 0;
}

.nav-hamburger span:nth-child(1) { width: 14px; top: 4px; }
.nav-hamburger span:nth-child(2) { width: 22px; top: 11px; }
.nav-hamburger span:nth-child(3) { width: 18px; top: 18px; }

nav[data-theme="dark"] .nav-hamburger:hover span { background: #00d4aa; }
nav[data-theme="light"] .nav-hamburger:hover span { background: #00a884; }
.nav-hamburger:hover span:nth-child(1) { width: 22px; }
.nav-hamburger:hover span:nth-child(3) { width: 22px; }

.nav-hamburger.open span:nth-child(1) { width: 22px; top: 11px; transform: rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.open span:nth-child(3) { width: 22px; top: 11px; transform: rotate(-45deg); }

/* === NAV DRAWER === */
.nav-drawer {
  display: none;
  position: fixed;
  top: 101px;
  right: 0;
  width: 280px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-radius: 0 0 0 8px;
  padding: 1.5rem 2rem;
  z-index: 99;
  flex-direction: column;
  gap: 1.5rem;
  animation: drawerIn 0.25s ease-out;
}

.nav-drawer[data-theme="light"] {
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.nav-drawer[data-theme="dark"] {
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.nav-drawer.open { display: flex; }

.nav-drawer a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.nav-drawer a:last-child { border-bottom: none; }

@keyframes drawerIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === FOOTER === */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

footer[data-theme="dark"] { color: var(--text-muted); }
footer[data-theme="dark"] a { color: var(--text-muted); }
footer[data-theme="light"] { color: var(--text-light, var(--text-muted)); }
footer[data-theme="light"] a { color: var(--text-light, var(--text-muted)); }

footer a {
  text-decoration: none;
  transition: color 0.3s;
}

footer a:hover { color: var(--text); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-logo img { height: 56px; }
  .nav-links { display: none; }
  .nav-right { gap: 1rem; }
  .nav-phone-icon { display: flex; }
  .nav-phone-icon svg {
    width: 20px; height: 20px;
    fill: none; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
  }
  nav[data-theme="dark"] .nav-phone-icon svg { stroke: #00d4aa; }
  nav[data-theme="light"] .nav-phone-icon svg { stroke: #00a884; }
  .nav-drawer {
    top: 85px;
    left: 0;
    width: auto;
    border-left: none;
    border-radius: 0;
  }
}
