* {
  box-sizing: border-box;
}

/* ===== BODY ===== */
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto;
  background: #f6f4f1;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

/* =========================
   HEADER (SINGLE SOURCE)
========================= */

.site-header {
  background-color: #4A3B2A; /* SINGLE BG */
  color: #ffffff;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 1000;

  /* iOS repaint fix */
  background-clip: padding-box;
  will-change: transform;
}

.site-header .header-inner,
.header-container {
  max-width: 1200px;
  margin: auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

/* =========================
   MAIN NAV
========================= */
.logo a{
    background-color:  #4A3B2A;
    color: white;
}

.main-nav {
  display: flex;
  align-items: center;
}

.main-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

.main-nav a,
.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}

.main-nav a:hover,
.nav-link:hover {
  color: #ffddb8;
  transform: scale(1.05);
}

.main-nav .active {
  background: #A05420;
  padding: 6px 12px;
  border-radius: 6px;
  color: #ffffff;
}

/* =========================
   TOOLS PANEL
========================= */

.nav-dropdown {
  position: relative;
}

.tools-panel {
  display: none;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;

  /* iOS paint fix */
  background-clip: padding-box;
  will-change: transform;
}

/* =========================
   TOOLS PANEL HOVER FIX
========================= */


/* =========================
   TOOLS PANEL VISIBILITY
========================= */

/* =========================
   TESTING TOOLS MENU
========================= */

.tools-wrapper {
  position: relative;
}

/* Hidden by default */
.tools-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100vw;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  z-index: 999;
}

/* Open only on Testing Tools */
.tools-wrapper:hover .tools-panel {
  display: block;
}

/* Keep open while hovering panel */
.tools-panel:hover {
  display: block;
}



/* =========================
   TOOLS LAYOUT
========================= */

.tools-container {
  max-width: 1200px;
  margin: auto;
  padding: 18px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tools-container a {
  padding: 10px 14px;
  background: #f5f7fb;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  color: #1f2937;
  transition: all 0.25s ease;
}

.tools-container a:hover {
  background: #2563eb;
  color: #ffffff;
  transform: translateY(-2px);
}

.tools-container a.active {
  background: #2563eb;
  color: #ffffff;
}

/* =========================
   PAGE CONTAINER
========================= */

.page-container {
  width: 70%;
  max-width: 1000px;
  margin: 40px auto;
}

@media (max-width: 768px) {
  .page-container {
    width: 95%;
  }
}

/* =========================
   TOOL CARD
========================= */

.tool-card {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

h1, h2, h3 {
  color: #4A3B2A;
  margin-top: 0;
}

.tool-desc {
  margin-bottom: 25px;
  font-size: 15px;
}

/* =========================
   FORM ELEMENTS
========================= */

textarea, select {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

textarea {
  resize: vertical;
}

/* =========================
   BUTTONS
========================= */

.actions {
  display: flex;
  gap: 12px;
  margin-top: 15px;
  flex-wrap: wrap;
}

button {
  padding: 12px 20px;
  font-size: 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.primary-btn {
  background: #4A3B2A;
  color: #fff;
}

.primary-btn:hover {
  background: #3a2f22;
}

.secondary-btn {
  background: #A05420;
  color: #fff;
}

/* =========================
   FOOTER (FIXED)
========================= */

.site-footer {
  background-color: #222222; /* FORCE */
  color: #cccccc;
  margin-top: 60px;

  /* iOS repaint fix */
  background-clip: padding-box;
  will-change: transform;
}

.site-footer .footer-inner {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
  text-align: center;
  font-size: 14px;
}

/* Mobile toggle support */
.tools-panel.open {
  display: block;
}

/* =========================
   MOBILE SAFETY
========================= */

@media (max-width: 768px) {
  .site-header,
  .site-footer {
    width: 100%;
    left: 0;
    right: 0;
  }
}
