/* General body styling */
body {
  font-family: Arial, sans-serif;
  margin: 2rem;
  background: #f4f4f4;
}

/* Header layout */
#pageHeader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px;
}

#pageHeader img {
  height: 160px;
  width: auto;
}

#pageHeader h1 {
  margin: 0;
  font-size: 36px;
}

.tool-note {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
}

.swing-speed-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.swing-speed-table {
  flex: 2;
  min-width: 300px;
}

.swing-speed-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.swing-speed-table th,
.swing-speed-table td {
  border: 1px solid #ccc;
  padding: 0.6rem;
  text-align: center;
}

.swing-speed-table th {
  background-color: #f5f5f5;
  font-weight: bold;
}

.swing-speed-notes {
  flex: 1;
  min-width: 220px;
  font-size: 0.9rem;
  color: #444;
}
/* Container layout */
.container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
}

/* Form section */
.form-section {
  flex: 1;
  min-width: 250px;
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Canvas and feedback */
.canvas-section {
  flex: 1;
  min-width: 250px;
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Footer */
.site-footer {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  margin-top: 40px;
  padding: 20px;
  border-top: 1px solid #ccc;
  background-color: #f9f9f9;
}
.site-footer a {
  color: #4CAF50;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

label {
  display: block;
  margin-top: 1rem;
}

input, select, button {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.5rem;
  font-size: 1rem;
}

canvas {
  border: 1px solid #ccc;
  width: 100%;
  height: 300px;
}

#results {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.5;
}

#adviceBox {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.5;
}

#loftWarning {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: red;
}

/* Dynamic loft explanation section */
.loft-section {
  margin-top: 40px;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  font-size: 1.5rem;
  border-left: 4px solid #4CAF50;
}

/* Illustration/swing advice section */
.illustration-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  margin-top: 2rem;
}

.illustration-content,
.swing-advice {
  flex: 1;
  min-width: 280px;
  border: 1px solid #ccc; /* light gray border */
  padding: 1rem;
  border-radius: 8px;     /* rounded corners */
}

.illustration-content img {
  max-width: 100%;
  height: auto;
}

.swing-advice p {
  font-size: 1.2rem;
  line-height: 1.5;
}

.swing-advice img {
  max-width: 100%;
  height: auto;
}

.caption {
  font-style: italic;
  margin-top: 10px;
  text-align: center;
  font-size: 24px;
}

/* Info/contact section */
#info-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  margin-top: 2rem;
}

#info-sections > div {
  flex: 1;
  min-width: 280px;
}

.advertise-logo {
  margin-top: 10px;
}

.advertise-logo img {
  max-width: 200px;
  height: auto;
}

/* Responsive layout */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  #pageHeader {
    flex-direction: column;
    text-align: center;
  }

  #pageHeader h1 {
    font-size: 28px;
  }

  #pageHeader img {
    height: 50px;
  }
}