@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&family=Roboto+Slab:wght@100..900&display=swap');
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito Sans', sans-serif;
  line-height: 1.6;
  color: #333;
}

h1, h2, h3 { 
  font-family: 'Roboto Slab', sans-serif;
  font-weight: 400;
}
h1 { 
  text-align: center;
  font-size: 24px; 
}

main {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

#chartdiv-wrapper { 
  padding:20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
#chartdiv {
  width: 100%;
  height: 550px;
  background: white;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background-color: #fefefe;
  margin: 3% auto;
  padding: 30px;
  border: 1px solid #888;
  border-radius: 12px;
  width: 90%;
  max-width: 1024px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  animation: slideIn 0.3s;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close {
  color: #666;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 20px;
  transition: color 0.2s;
}

.close:hover,
.close:focus {
  color: #000;
}

#countyName {
  color: #314D64;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid #406EAE;
  clear: both;
}

.modal-section {
  margin: 25px 0;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
}

.modal-section:last-child {
  border-bottom: none;
}

.modal-section .half-section {
	width: calc(50% - 20px);
	display:inline-block;
	margin-right: 20px;
    vertical-align: top;
}
.modal-section .half-section:last-child { 
	margin-right: 0px;
}

.modal-section h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #314D64;
  font-size: 18px;
}

.modal-section h4 {
  margin: 0 0 10px 0;
  color: #314D64;
  font-size: 18px;
}

.modal-section p {
  line-height: 1.8;
}

.modal-section a {
  color: #406EAE;
  text-decoration: none;
}

.modal-section a:hover {
  text-decoration: underline;
}

/* Contact Cards */
.contact-card {
  background: #f9f9f9;
  padding: 15px;
  margin: 10px 20px 0 0;
  border-radius: 8px;
  border-left: 4px solid #406EAE;
  transition: transform 0.2s, box-shadow 0.2s;
  display:inline-block;
  width: calc(50% - 23px);
  min-width:200px;
}
.contact-card:last-child { 
	margin-right: 0px;
}

.contact-card:hover {
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.contact-card h4 {
  margin: 0 0 10px 0;
  color: #314D64;
  font-size: 18px;
}

.contact-card p {
  margin: 0;
  font-size: 14px;
}

/* Stats Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.stat-item {
  background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
  padding: 20px 15px;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.2s;
}

.stat-item:hover {
  transform: translateY(-3px);
}

.stat-item .stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #314D64;
  display: block;
  margin-bottom: 5px;
}

.stat-item .stat-label {
  font-size: 13px;
  color: #666;
  line-height: 1.3;
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 24px;
  }
  
  .subtitle {
    font-size: 14px;
  }
  
  #chartdiv {
    height: 400px;
  }
  
  .modal-content {
    margin: 10% auto;
    padding: 20px;
    width: 95%;
  }
  .half-section {
	  width:100% !important;
	  margin-bottom:20px;
  }
  .contact-card {
	  width:100%;
  }
  
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-item .stat-value {
    font-size: 20px;
  }
  
  .stat-item .stat-label {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
}


.county-selector {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

.county-selector label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.county-selector select {
  width: 100%;
  max-width: 400px;
  padding: 10px 15px;
  font-size: 16px;
  border: 2px solid #3EA39E;
  border-radius: 5px;
  background-color: white;
  cursor: pointer;
  transition: border-color 0.2s;
}

.county-selector select:hover,
.county-selector select:focus {
  border-color: #314D64;
  outline: none;
}