/* CalcVenue - Main Stylesheet */

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  color: #333;
  background: #f5f5f5;
  line-height: 1.6;
}

a { color: #1a73e8; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
header {
  background: #1a73e8;
  color: #fff;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo a {
  color: #fff;
  text-decoration: none;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 1px;
}


.header-search input {
  padding: 6px 12px;
  border: none;
  border-radius: 3px 0 0 3px;
  font-size: 14px;
  width: 220px;
  outline: none;
}

.header-search button {
  padding: 6px 12px;
  background: #0d47a1;
  color: #fff;
  border: none;
  border-radius: 0 3px 3px 0;
  cursor: pointer;
  font-size: 14px;
}

.header-search button:hover { background: #083378; }

/* ===== NAVIGATION ===== */
nav {
  background: #fff;
  border-bottom: 1px solid #ddd;
  position: relative;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

nav a {
  display: block;
  padding: 10px 16px;
  color: #444;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

nav a:hover, nav a.active {
  color: #1a73e8;
  border-bottom-color: #1a73e8;
  text-decoration: none;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 10px 16px;
  color: #444;
}

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

/* ===== MAIN LAYOUT ===== */
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  gap: 4%;
}

.left-col { flex: 1 1 0; min-width: 0; }
.right-col { flex: 0 0 300px; width: 300px; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}
.breadcrumb a { color: #1a73e8; }
.breadcrumb span { margin: 0 4px; }

/* ===== PAGE TITLE ===== */
h1.page-title {
  font-size: 24px;
  color: #222;
  margin-bottom: 16px;
  border-bottom: 2px solid #1a73e8;
  padding-bottom: 8px;
}

.calc-description {
  font-size: 14px;
  color: #555;
  margin: -8px 0 18px;
  line-height: 1.6;
}
.calc-description a { color: #1a73e8; text-decoration: none; }
.calc-description a:hover { text-decoration: underline; }

/* ===== CALCULATOR FORM ===== */
.calc-box {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;
}

.calc-box h2 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #1a73e8;
}

.form-group {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.form-group label {
  min-width: 200px;
  font-weight: 600;
  font-size: 14px;
  color: #444;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
  padding: 7px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 14px;
  flex: 1;
  min-width: 120px;
  max-width: 300px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #1a73e8;
}

/* Input with currency/unit prefix */
.input-prefix-wrap {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #ccc;
  border-radius: 3px;
  overflow: hidden;
  flex: 1;
  min-width: 120px;
  max-width: 300px;
}
.input-prefix-wrap:focus-within { border-color: #1a73e8; }
.input-prefix {
  background: #f0f0f0;
  padding: 7px 9px;
  font-size: 14px;
  color: #555;
  border-right: 1px solid #ccc;
  flex-shrink: 0;
}
.input-prefix-wrap input {
  border: none !important;
  border-radius: 0 !important;
  flex: 1;
  min-width: 60px;
  max-width: none;
  outline: none;
  padding: 7px 10px;
  font-size: 14px;
}

.form-group .unit-toggle {
  display: flex;
  gap: 0;
  border: 1px solid #ccc;
  border-radius: 3px;
  overflow: hidden;
}

.form-group .unit-toggle label {
  min-width: auto;
  padding: 6px 12px;
  background: #fff;
  cursor: pointer;
  font-weight: normal;
  font-size: 13px;
  border: none;
  transition: background 0.2s;
}

.form-group .unit-toggle input[type="radio"] { display: none; }
.form-group .unit-toggle input[type="radio"]:checked + label {
  background: #1a73e8;
  color: #fff;
}

.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 160px; }

/* Radio group */
.radio-group { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-group label {
  min-width: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: normal;
  cursor: pointer;
}
.radio-group input[type="radio"] { margin: 0; }

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #1a73e8;
  margin-bottom: 16px;
}

.tab-btn {
  padding: 8px 20px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-bottom: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  transition: background 0.2s;
}

.tab-btn.active {
  background: #1a73e8;
  color: #fff;
  border-color: #1a73e8;
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Buttons — shared spacing: margin-right creates equal gaps between any combination */
.btn-calc, .btn-clear, .btn-secondary {
  margin-top: 8px;
  margin-right: 8px;
}

.btn-calc {
  background: #1a73e8;
  color: #fff;
  border: none;
  padding: 10px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-calc:hover { background: #1558b0; }

.btn-clear {
  background: #757575;
  color: #fff;
  border: none;
  padding: 10px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-clear:hover { background: #616161; }

.btn-secondary {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ccc;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover { background: #e0e0e0; }

.btn-danger {
  background: #e53935;
  color: #fff;
  border: none;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 3px;
  cursor: pointer;
}

/* ===== RESULTS SECTION ===== */
.results-section {
  background: #e8f0fe;
  border: 1px solid #c5d9f7;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;
}

.results-section h2 {
  font-size: 18px;
  color: #1a73e8;
  margin-bottom: 14px;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.result-table th, .result-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid #c5d9f7;
}

.result-table th {
  background: #1a73e8;
  color: #fff;
  font-weight: 600;
}

.result-table tr:nth-child(even) td { background: #f0f5fe; }

.result-highlight {
  font-size: 18px;
  font-weight: 700;
  color: #1a73e8;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.result-card {
  background: #fff;
  border: 1px solid #c5d9f7;
  border-radius: 4px;
  padding: 12px;
  text-align: center;
}

.result-card .rc-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.result-card .rc-value {
  font-size: 20px;
  font-weight: 700;
  color: #1a73e8;
}

.result-item {
  background: #fff;
  border: 1px solid #c5d9f7;
  border-radius: 4px;
  padding: 10px 14px;
}
.result-label {
  font-size: 12px;
  color: #666;
  display: block;
  margin-bottom: 3px;
}
.result-value {
  font-size: 18px;
  font-weight: 700;
  color: #1a73e8;
  display: block;
}

/* Amortization table */
.amort-table-wrap {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 3px;
  margin-top: 12px;
}

.amort-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.amort-table th {
  background: #1a73e8;
  color: #fff;
  padding: 8px 10px;
  text-align: right;
  position: sticky;
  top: 0;
}

.amort-table th:first-child { text-align: left; }

.amort-table td {
  padding: 6px 10px;
  text-align: right;
  border-bottom: 1px solid #eee;
}

.amort-table td:first-child { text-align: left; }
.amort-table tr:nth-child(even) td { background: #f9fafe; }

/* ===== SEO CONTENT ===== */
.seo-content {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 20px;
}

.seo-content h2 {
  font-size: 20px;
  color: #222;
  margin: 20px 0 8px;
  border-left: 4px solid #1a73e8;
  padding-left: 10px;
}

.seo-content h2:first-child { margin-top: 0; }

.seo-content h3 {
  font-size: 16px;
  color: #333;
  margin: 14px 0 6px;
}

.seo-content p { margin-bottom: 10px; line-height: 1.7; }

.seo-content ul, .seo-content ol {
  margin: 8px 0 10px 24px;
  line-height: 1.7;
}

.faq-item { margin-bottom: 16px; }
.faq-item h4 {
  font-size: 15px;
  color: #1a73e8;
  margin-bottom: 4px;
}

/* ===== RIGHT SIDEBAR ===== */
.ad-placeholder {
  width: 100%;
  height: 250px;
  background: #e9e9e9;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ccc;
  border-radius: 3px;
  color: #888;
  font-size: 13px;
  margin-bottom: 20px;
}

.related-calcs {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 14px;
  margin-bottom: 20px;
}

.related-calcs h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #333;
  border-bottom: 1px solid #ddd;
  padding-bottom: 6px;
}

.related-calcs ul {
  list-style: none;
  padding: 0;
}

.related-calcs li { margin-bottom: 6px; }
.related-calcs a {
  font-size: 13px;
  color: #1a73e8;
  display: block;
  padding: 2px 0;
}

.related-calcs a:hover { text-decoration: underline; }

/* ===== DYNAMIC TABLE (GPA, Debt, etc.) ===== */
.dynamic-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  font-size: 14px;
}

.dynamic-table th {
  background: #f5f5f5;
  padding: 8px;
  text-align: left;
  border: 1px solid #ddd;
  font-weight: 600;
  font-size: 13px;
}

.dynamic-table td {
  padding: 6px;
  border: 1px solid #ddd;
}

.dynamic-table input,
.dynamic-table select {
  width: 100%;
  padding: 5px 7px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 13px;
}

/* ===== DICE ROLLER ===== */
.dice-display {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.die {
  width: 50px;
  height: 50px;
  background: #fff;
  border: 2px solid #1a73e8;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #1a73e8;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

/* ===== HOMEPAGE ===== */
.hero {
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  color: #fff;
  padding: 40px 20px;
  text-align: center;
}

.hero h1 { font-size: 34px; margin-bottom: 10px; }
.hero p { font-size: 16px; opacity: 0.9; margin-bottom: 20px; }

.hero-search {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
}

.hero-search input {
  flex: 1;
  padding: 12px 16px;
  font-size: 15px;
  border: none;
  border-radius: 4px 0 0 4px;
  outline: none;
}

.hero-search button {
  padding: 12px 20px;
  background: #0d47a1;
  color: #fff;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}

.home-content { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }

.category-section { margin-bottom: 30px; }

.category-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin-bottom: 14px;
  border-bottom: 2px solid #1a73e8;
  padding-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.calc-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 14px;
  text-decoration: none;
  color: #333;
  transition: box-shadow 0.2s, border-color 0.2s;
  display: block;
}

.calc-card:hover {
  box-shadow: 0 3px 10px rgba(26,115,232,0.15);
  border-color: #1a73e8;
  text-decoration: none;
}

.calc-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: #1a73e8;
  margin-bottom: 5px;
}

.calc-card p {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

/* ===== FOOTER ===== */
footer {
  background: #333;
  color: #ccc;
  padding: 16px 20px;
  margin-top: 20px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}


.footer-bottom {
  text-align: center;
  font-size: 12px;
  color: #888;
}

.footer-legal {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.footer-legal a {
  color: #aaa;
  font-size: 12px;
  text-decoration: none;
}

.footer-legal a:hover { color: #fff; }

/* ===== UTILITY ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }

.info-box {
  background: #fff8e1;
  border-left: 4px solid #f9a825;
  padding: 10px 14px;
  margin: 10px 0;
  font-size: 13px;
  border-radius: 0 3px 3px 0;
}

.success-box {
  background: #e8f5e9;
  border-left: 4px solid #43a047;
  padding: 10px 14px;
  margin: 10px 0;
  font-size: 13px;
  border-radius: 0 3px 3px 0;
}

/* State Tax Table */
.state-tax-table-wrap {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 3px;
  margin-top: 12px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  /* Navigation — hamburger lives in header on mobile */
  .hamburger { display: block; color: #fff; font-size: 24px; padding: 0; }

  /* Center logo, hamburger stays left */
  .header-inner { justify-content: flex-start; }
  .logo { flex: 1; display: flex; justify-content: center; }

  /* Collapse the nav bar (it's empty on mobile) — keep display:block so nav-links can show */
  nav { height: 0; border: none; overflow: visible; }

  /* Nav-links overlay: drops below header, sits on top of content */
  .nav-links {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: column;
    background: #fff;
    border-bottom: 2px solid #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 500;
  }
  .nav-links.open { display: flex; }
  nav a { border-bottom: 1px solid #eee; border-right: none; padding: 12px 16px; }
  nav a.active { border-bottom-color: #eee; }

  /* Layout */
  .page-wrapper { flex-direction: column; }
  .left-col, .right-col { flex: none; max-width: 100%; width: 100%; }

  /* Forms */
  .form-group label { min-width: 140px; }

  /* Grids */
  .result-grid { grid-template-columns: 1fr 1fr; }
  .calc-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

  /* Hero */
  .hero h1 { font-size: 24px; }
  .hero-search { flex-direction: column; gap: 8px; }
  .hero-search input { border-radius: 4px; width: 100%; box-sizing: border-box; }
  .hero-search button { border-radius: 4px; width: 100%; }

  /* Tabs */
  .tabs { flex-wrap: wrap; }
  .tab-btn { padding: 7px 12px; font-size: 13px; }

  /* Tables — horizontal scroll */
  .amort-table-wrap { overflow-x: auto; }
  .result-table { display: block; overflow-x: auto; white-space: nowrap; }

  /* Buttons */
  .btn-calc, .btn-clear { padding: 10px 18px; font-size: 14px; }

  /* Calc box */
  .calc-box { padding: 16px 12px; }
}

@media (max-width: 480px) {
  /* Forms */
  .form-group { flex-direction: column; align-items: flex-start; }
  .form-group label { min-width: auto; }
  .form-group input, .form-group select { max-width: 100%; width: 100%; box-sizing: border-box; }
  .form-group input[type="checkbox"], .form-group input[type="radio"] { width: auto; max-width: none; }
  .input-prefix-wrap { max-width: 100%; width: 100%; box-sizing: border-box; }
  .input-prefix-wrap input { flex: 1; min-width: 0; }

  /* Grids */
  .result-grid { grid-template-columns: 1fr; }
  .calc-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

  /* Tabs */
  .tab-btn { padding: 6px 10px; font-size: 12px; }

  /* Buttons */
  .btn-calc, .btn-clear { padding: 9px 14px; font-size: 13px; }

  /* Calc box */
  .calc-box { padding: 12px 10px; }

  /* Hero */
  .hero { padding: 24px 12px; }
  .hero h1 { font-size: 20px; }
}

/* IP Subnet specific */
.ip-input-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ip-input-group input {
  width: 60px;
  text-align: center;
  padding: 7px 4px;
}

.ip-sep { font-weight: 700; font-size: 18px; color: #333; }

/* Pace calculator */
.pace-modes { display: flex; gap: 0; margin-bottom: 14px; }
.mode-btn {
  padding: 8px 16px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}
.mode-btn.active { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.mode-btn:first-child { border-radius: 3px 0 0 3px; }
.mode-btn:last-child { border-radius: 0 3px 3px 0; }

/* Number spinner for dice */
.num-spinner { width: 70px; }

/* Fraction display */
.fraction-display {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
  color: #1a73e8;
  border-left: 2px solid #1a73e8;
  padding: 0 8px;
  margin: 0 4px;
}

.fraction-display .frac-num { border-bottom: 2px solid #1a73e8; padding-bottom: 2px; }

.step-box {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 12px;
  font-size: 13px;
  margin-top: 10px;
  line-height: 1.8;
}

.step-box h4 { font-size: 14px; margin-bottom: 6px; color: #333; }

/* ===== CATEGORY PAGES ===== */
.cat-page-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 48px;
  margin-bottom: 24px;
}

.cat-group h2 {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin-bottom: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e0e0e0;
}

.cat-group ul {
  list-style: none;
  padding: 0;
}

.cat-group ul li {
  margin-bottom: 5px;
}

.cat-group ul li a {
  font-size: 14px;
  color: #1a73e8;
}

.cat-group ul li a:hover {
  text-decoration: underline;
}

/* Sidebar search (category pages) */
.sidebar-search {
  display: flex;
  margin: 0 0 14px 0;
}

.sidebar-search input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid #ccc;
  border-right: none;
  font-size: 13px;
  border-radius: 3px 0 0 3px;
  outline: none;
  min-width: 0;
}

.sidebar-search input:focus { border-color: #1a73e8; }

.sidebar-search button {
  padding: 7px 12px;
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 0 3px 3px 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.sidebar-search button:hover { background: #1558b0; }

/* Live sidebar search results */
.ss-live-results { margin-top: 6px; }
.ss-live-link {
  display: block;
  padding: 6px 4px;
  color: #1a73e8;
  font-size: 13px;
  text-decoration: none;
  line-height: 1.4;
}
.ss-live-link:hover { text-decoration: underline; }
.ss-live-results:empty { display: none; }

@media (max-width: 600px) {
  .cat-page-grid { grid-template-columns: 1fr; }
}
