/* ---------------------------------------
   1) Global Reset & Base Styles
----------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', Arial, sans-serif; /* You can swap in your preferred font */
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
  padding-bottom: 50px;
}

/* Accessibility skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: static;
  padding: 10px;
  background: #000;
  color: #fff;
  z-index: 1000;
}

/* ---------------------------------------
   2) Header & Footer
----------------------------------------- */
header {
  background-color: #fff;
  border-bottom: 1px solid #ddd;
  padding: 20px 10px;
  text-align: center;
}
header h1 {
  font-size: 2rem;
  margin: 0;
  font-weight: 600;
  color: #333;
}

footer {
  background-color: #fff;
  border-top: 1px solid #ddd;
  text-align: center;
  padding: 20px 10px;
  color: #666;
  font-size: 0.9rem;
  position: relative;
  margin-top: 50px;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------------------------------------
   3) Hero Section (Homepage)
----------------------------------------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
  padding: 0 20px;
  background: linear-gradient(160deg, #f1f1f1, #fdfdfd);
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #222;
}
.hero h2 {
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: #555;
}

.search-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
}

.search-form input[type="text"] {
  width: 600px;
  max-width: 90%;
  font-size: 1.1rem;
  padding: 12px 20px;
  border: 1px solid #ccc;
  border-radius: 30px;
  outline: none;
  transition: box-shadow 0.3s;
}
.search-form input[type="text"]:focus {
  box-shadow: 0 0 5px rgba(66,133,244,0.5);
}

.search-form button {
  margin-top: 15px;
  padding: 12px 30px;
  font-size: 1.1rem;
  border: none;
  border-radius: 30px;
  background: #4285f4;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.search-form button:hover {
  background: #2f71d3;
  transform: scale(1.02);
}

.free-label {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #777;
}
.trust-badge {
  font-size: 0.8rem;
  color: #999;
}

/* ---------------------------------------
   4) .tool-info Section (Fade-in)
----------------------------------------- */
.tool-info {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);

  /* Fade in */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}

.tool-info.in-view {
  opacity: 1;
  transform: translateY(0);
}

.tool-info h2 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.tool-info p,
.tool-info ul {
  margin-bottom: 15px;
  color: #444;
}

.tool-info ul {
  list-style: disc;
  margin-left: 20px;
}

/* ---------------------------------------
   5) Summary Panel (on Results Page)
----------------------------------------- */
.summary-panel {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-align: center;
}
.speed-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  margin: 20px 0;
}
.metric {
  flex: 1 1 40%;
  margin: 10px;
  background: #fdfdfd;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.metric h3 {
  font-size: 1.1rem;
  color: #4285f4;
  margin-bottom: 5px;
}
.metric p {
  font-size: 1rem;
  color: #333;
}
.summary-explanation {
  font-size: 0.95rem;
  color: #555;
}

/* ---------------------------------------
   6) CTA Buttons
----------------------------------------- */
.cta-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 20px auto;
  max-width: 800px;
}

.cta-button {
  flex: 1 1 220px;
  text-align: center;
  padding: 14px 25px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #4285f4;
  border: none;
  border-radius: 30px;
  transition: background 0.3s, transform 0.3s;
  text-decoration: none;
}
.cta-button:hover {
  background: #2f71d3;
  transform: scale(1.02);
}

/* ---------------------------------------
   7) Map Section
----------------------------------------- */
.map-section {
  margin-top: 40px;
  text-align: center;
}
#map-container {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  margin: 20px auto 0 auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* ---------------------------------------
   8) Charts Section
----------------------------------------- */
.charts-container {
  max-width: 800px;
  margin: 40px auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.chart-desc {
  font-size: 0.85rem;
  margin-top: 8px;
  color: #555;
  text-align: center;
}

/* ---------------------------------------
   9) Table & Utility Styles
----------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  text-align: left;
  padding: 8px;
}
th {
  background: #f1f1f1;
  font-weight: 600;
}
tr:nth-child(even) {
  background: #fafafa;
}

/* Additional utility classes for smaller typography or spacing if needed */
.small-text {
  font-size: 0.85rem;
}

/* ---------------------------------------
   10) Responsive Breakpoints
----------------------------------------- */
@media (max-width: 768px) {
  .speed-metrics {
    flex-direction: column;
    align-items: center;
  }
  .metric {
    width: 80%;
    margin: 10px 0;
  }
  .cta-container {
    flex-direction: column;
  }
  .charts-container {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero h2 {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .search-form input[type="text"] {
    width: 90%;
  }
  .hero h1 {
    font-size: 1.7rem;
  }
  .hero h2 {
    font-size: 0.9rem;
  }
  .cta-button {
    font-size: 0.9rem;
    padding: 12px 20px;
  }
}
