:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --accent: #0c316d;
  --surface: #f5f5f5;
  --nav-bg: #ffffff;
  --nav-text: #1a1a1a;
  --footer-bg: #f1f3f4;
  --footer-text: #5f6368;
}

[data-theme="dark"] {
  --bg: #202124;
  --text: #e8eaed;
  --surface: #303134;
  --nav-bg: #303134;
  --nav-text: #ffffff;
  --footer-bg: #171717;
  --footer-text: #9aa0a6;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--nav-bg);
  color: var(--nav-text);
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--surface);
}

.navbar-title {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
}

.theme-btn {
  background: none;
  border: none;
  color: var(--nav-text);
  font-size: 1.2rem;
  cursor: pointer;
}

.nav-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  background: var(--accent);
  padding: 0.5rem 1rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: none;
  border: none;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-size: 1rem;
}

.tab-btn.active,
.tab-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.container {
  flex: 1 0 auto;
  padding: 2rem 1rem;
  max-width: 960px;
  margin: auto;
}

.map-section iframe {
  width: 100%;
  height: 300px;
  border: none;
  border-radius: 8px;
}

.hero {
  text-align: center;
  margin-top: 1rem;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.hero h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.pdf-tab, .placeholder {
  text-align: center;
  padding: 2rem 1rem;
}

.pdf-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1.2rem;
  margin-top: 1rem;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s;
}

.pdf-btn:hover {
  background: var(--nav-text);
  color: var(--bg);
}

.footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Inside tab styles */
.inside-tabs {
  background: var(--surface);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.inside-nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  overflow-x: auto;
}

.inside-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s, color 0.3s;
}

.inside-btn.active,
.inside-btn:hover {
  background: var(--nav-text);
  color: var(--bg);
}

.inside-content {
  display: none;
  background: var(--surface);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.inside-content.active {
  display: block;
}

.inside-content ul {
  list-style: decimal;
  padding-left: 1.5rem;
  margin: 0;
}

.inside-content li {
  margin: 0.25rem 0;
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.5rem;
  }
  .hero h2 {
    font-size: 1.2rem;
  }
  .navbar-title {
    font-size: 1rem;
  }
  .map-section iframe {
    height: 200px;
  }
  .tab-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
}

/* Outside directory styles */
#outside .search-container {
  text-align: center;
  margin-bottom: 1rem;
}

#outside .search-container input {
  padding: 0.6rem 1rem;
  width: 100%;
  max-width: 350px;
  border: 2px solid var(--accent);
  border-radius: 25px;
  font-size: 1rem;
  background-color: var(--surface);
  background-image: url('data:image/svg+xml;utf8,<svg fill="%230c316d" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5L20.49 19l-5-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.2rem;
  transition: box-shadow 0.2s;
}

#outside .search-container input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(12, 49, 109, 0.3);
}

.outside-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.outside-tab-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 0.4rem 0.8rem;
  margin: 0.25rem;
  border-radius: 4px;
  cursor: pointer;
}

.outside-tab-btn.active,
.outside-tab-btn:hover {
  background: var(--nav-text);
  color: var(--bg);
}

@media (max-width: 600px) {
  .outside-nav {
    flex-direction: column;
    align-items: stretch;
  }
  .outside-tab-btn {
    width: 100%;
    margin: 0.25rem 0;
  }
}

.outside-section {
  display: none;
  margin-top: 2rem;
}

.outside-section.active {
  display: block;
}

.outside-section h2 {
  margin-bottom: 1rem;
  text-align: center;
}

/* Important numbers section */
#important-section {
  margin-top: 2rem;
}

#important-section h2 {
  text-align: center;
  margin-bottom: 1rem;
}

#important-section .outside-table {
  width: auto;
  margin: 0 auto;
}

.family-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.family-card {
  background: var(--surface);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 300px;
  transition: transform 0.2s;
}

.family-card:hover {
  transform: translateY(-3px);
}

.family-card h3 {
  margin-bottom: 0.5rem;
}

.contact-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.contact-table td {
  padding: 0.25rem;
  border-bottom: 1px solid var(--nav-bg);
  vertical-align: top;
}

.contact-table td:first-child {
  font-weight: 600;
}

.outside-table {
  width: 100%;
  border-collapse: collapse;
}

.outside-table th,
.outside-table td {
  padding: 0.5rem;
  border: 1px solid var(--surface);
}

.outside-table th {
  background: var(--accent);
  color: #fff;
}

#back-to-top {
  position: fixed;
  bottom: 40px;
  right: 20px;
  display: none;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 50%;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  z-index: 200;
}
