@charset "utf-8";
/* CSS Document */
/* Mobile-first responsive design */

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

@media (min-width:1024px) {
	main {
		margin-top:5vh;
		postion:relative;
		z-index:5;
	}
}

.map-container {
	width:100%;
	max-width:625px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 1rem;
    margin: 0 auto 2rem auto;
	border:1px solid #5D6E00;
	text-align:center;
}

/* Base county styling */
.county {
    fill: rgba(0,51,102,1.00);
    stroke: #da9434;
    stroke-width: 3;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Individual county hover effects */
.county:hover {
    fill: #4a90e2;
    stroke: #1a365d;
    stroke-width: 2;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
    transform: scale(1.02);
    transform-origin: center;
}

/* Different color classes if you want variety */
.county.st1:hover {
    fill: #8DD6FF;
}
.county.st2:hover {
    fill: #FFC88A;
}
.county.st3:hover {
    fill: #21A1FF;
}
.county.st4:hover {
    fill: #BF8F41;
}
.county.st5:hover {
    fill: #45b7d1;
}

/* Active/clicked state */
.county.active {
    fill: #2c5aa0;
    stroke: #1a365d;
    stroke-width: 3;
}

/* Make sure your SVG container is responsive */
.map-container svg {
    width: 100%;
    max-width: 900px;
    height: auto;
}

.search-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 1.5rem;
    position: relative;
}

#county-search {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#county-search:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

#search-results {
    position: absolute;
    top: 100%;
    left: 1.5rem;
    right: 1.5rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.search-result {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.search-result:hover {
    background-color: #f8f9fa;
}

.search-result:last-child {
    border-bottom: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    color: #aaa;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close:hover,
.close:focus {
    color: #333;
    background-color: #f0f0f0;
}

#modal-title {
    background: linear-gradient(135deg, #2c5aa0, #1e3a5f);
    color: white;
    padding: 1.5rem 2rem;
    margin: 0;
    border-radius: 12px 12px 0 0;
    font-size: 1.5rem;
}

#modal-body {
    padding: 2rem;
}

.county-info {
    display: grid;
	grid-template-columns: 1fr;
    gap: 1.5rem;
}

.info-section {
	width:100%;
}

.info-section h3 {
    color: #2c5aa0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    border-bottom: 2px solid #e8f4f8;
    padding-bottom: 0.5rem;
}

.info-section p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.info-section strong {
    color: #1e3a5f;
}

#website a {
	text-decoration:none;
}

#website a::before {
	content:"🔗 ";
	margin-right: 0.5rem;
	text-decoration:none;
}

#points-of-interest {
    list-style: none;
    padding-left: 1rem;
	padding-right:1rem;
	width:100%;
	grid-column: 1/-1;
}

#points-of-interest-section{
	grid-column: 1/-1;
}

#points-of-interest li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
	width:100%;
}

#points-of-interest li:before {
    content: "📍 ";
    margin-right: 0.5rem;
}

.county-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: normal;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.county-tooltip.show {
    opacity: 1;
}

.county-tooltip strong {
    display: block;
    margin-bottom: 2px;
}


/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Tablet Styles */
@media (min-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    main {
        padding: 2rem;
    }
    
    .map-container {
        padding: 2rem;
        max-width: 625px; /* Keep image size consistent */
    }
    
    .county-info {
        grid-template-columns: 1fr 1fr;
    }
    
    .info-section:first-child {
        grid-column: 1 / -1;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    header {
        padding: 2rem;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 80%;
        max-height: 90vh;
    }
    
    .county-info {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .info-section:nth-child(2) {
        grid-column: 1 / -1;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .map {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .modal,
    .modal-content,
    .close,
    .map {
        transition: none;
        animation: none;
    }
}

/* Dark mode support 
@media (prefers-color-scheme: dark) {
    body {
        background-color: #303030;
        color: #e0e0e0;
    }
	
	h1, h2, h3, h4, h5, h6, {
		color:var(--light-gray) !important
	}
    
    .map-container,
    .search-container,
    .modal-content {
        background-color: #2d2d2d !important;
        color: #e0e0e0 !important;
    }
    
    .map {
        filter: brightness(0.9);
    }
    
    #county-search {
        background-color: #1D1D21;
        border-color: #5a5a5a;
        color: #e0e0e0;
    }
}*/