/* ========================================
   Muted Teal Color Palette
   ======================================== */
:root {
    --primary-teal: #5DADA8;
    --dark-teal: #4A8D89;
    --light-teal: #82C4C0;
    --mint: #A8D8D5;
    --coral: #E87A78;
    --dark-coral: #D96563;
    --cream: #F5EFE7;
    --background-teal: #9ACCC9;
    --background-white: #FFFFFF;
    --text-dark: #2C3E3D;
    --text-gray: #5A6766;
    --border-color: #C5E3E1;
    --success-green: #6BAB8E;
    --accent-rose: #E89FA0;
}

/* ========================================
   Reset & Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--background-teal);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Main Layout with Sidebar
   ======================================== */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.content-area {
    min-width: 0; /* Prevent overflow */
}

/* ========================================
   Affiliate Sidebar
   ======================================== */
.affiliate-sidebar {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.sidebar-card {
    background: var(--background-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0, 172, 193, 0.15);
    border: 3px solid var(--light-teal);
}

.sidebar-card h3 {
    color: var(--primary-teal);
    font-size: 1.3rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.sidebar-intro {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.affiliate-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 107, 157, 0.1);
}

.affiliate-section:last-of-type {
    border-bottom: none;
}

.affiliate-section h4 {
    color: var(--coral);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.affiliate-description {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.affiliate-link-placeholder {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.placeholder-box {
    background: rgba(130, 196, 192, 0.15);
    border: 2px dashed var(--primary-teal);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.placeholder-box:hover {
    background: rgba(130, 196, 192, 0.25);
    border-style: solid;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 173, 168, 0.2);
}

.placeholder-box p {
    margin: 0;
    color: var(--primary-teal);
    font-weight: 700;
    font-size: 0.9rem;
}

.sidebar-footer {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--mint);
    border-radius: 8px;
    border-left: 4px solid var(--primary-teal);
}

.sidebar-footer .disclaimer {
    font-size: 0.85rem;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.5;
}

/* Custom scrollbar for sidebar */
.affiliate-sidebar::-webkit-scrollbar {
    width: 6px;
}

.affiliate-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.affiliate-sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-teal);
    border-radius: 3px;
}

.affiliate-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--dark-coral);
}

/* ========================================
   Header
   ======================================== */
header {
    background: var(--dark-teal);
    background-image: url('retro_nurse.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 3rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(93, 173, 168, 0.92) 0%, rgba(74, 141, 137, 0.88) 100%);
    z-index: 1;
}

header .container {
    position: relative;
    z-index: 2;
}

.logo-space {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nurse-icon {
    display: none; /* Hide the small circular icon since nurse is now background */
}

.logo-space h1 {
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.tagline {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.hero h2 {
    font-size: 2rem;
    color: var(--dark-teal);
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-gray);
    max-width: 700px;
    margin: 0 auto;
}

/* ========================================
   Interactive Map Section
   ======================================== */
.map-section {
    padding: 2rem 0;
}

.map-card {
    background: var(--background-white);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 30px rgba(233, 30, 99, 0.15);
    border: 3px solid var(--primary-teal);
    position: relative;
    overflow: hidden;
}


.map-card > * {
    position: relative;
    z-index: 1;
}

.map-card h3 {
    color: var(--coral);
    margin-bottom: 1rem;
    font-size: 1.6rem;
    text-align: center;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.map-instructions {
    text-align: center;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.instruction-step {
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--light-teal) 100%);
    color: white;
    border-radius: 25px;
    box-shadow: 0 3px 10px rgba(233, 30, 99, 0.3);
}

.map-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

#usMap {
    width: 100%;
    height: auto;
    display: block;
    background: var(--cream);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* State styling */
#usMap path {
    fill: #f0f0f0;
    stroke: #FFFFFF;
    stroke-width: 2;
    cursor: pointer;
    transition: all 0.3s ease;
}

#usMap path:hover {
    fill: var(--light-teal);
    stroke-width: 3;
    filter: drop-shadow(0 2px 8px rgba(0, 172, 193, 0.5));
}

#usMap path.has-data {
    fill: var(--coral);
    opacity: 0.7;
}

#usMap path.has-data:hover {
    opacity: 1;
    fill: var(--dark-coral);
    filter: drop-shadow(0 3px 12px rgba(233, 30, 99, 0.6));
}

#usMap path.selected {
    fill: var(--primary-teal);
    opacity: 1;
    stroke: var(--dark-coral);
    stroke-width: 3;
    filter: drop-shadow(0 4px 15px rgba(0, 172, 193, 0.8));
    animation: pulse-select 1s ease-in-out;
}

@keyframes pulse-select {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

#usMap path.selected:hover {
    fill: var(--light-teal);
}

#usMap path.no-data {
    fill: #e8e8e8;
}

#usMap path.no-data:hover {
    fill: #d0d0d0;
}

/* State labels */
#usMap text {
    font-size: 11px;
    font-weight: bold;
    fill: #2C2C2C;
    pointer-events: none;
    text-anchor: middle;
    font-family: Arial, sans-serif;
}

/* Map legend */
.map-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: rgba(255, 248, 240, 0.5);
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 600;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.legend-color.has-data {
    background-color: var(--coral);
    opacity: 0.7;
    border-color: var(--dark-coral);
}

.legend-color.selected {
    background-color: var(--primary-teal);
    border-color: var(--dark-coral);
}

.legend-color.no-data {
    background-color: #e8e8e8;
    border-color: #ccc;
}

/* Tooltip for state hover */
.state-tooltip {
    position: absolute;
    background: var(--coral);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1000;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.4);
}

.state-tooltip.show {
    opacity: 1;
}

/* ========================================
   Search Section
   ======================================== */
.search-section {
    padding: 2rem 0;
}

.search-card {
    background: var(--background-white);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 30px rgba(0, 172, 193, 0.15);
    border: 3px solid var(--light-teal);
    max-width: 600px;
    margin: 0 auto;
}

.search-card h3 {
    color: var(--primary-teal);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    text-align: center;
    font-weight: 800;
    text-transform: uppercase;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--coral);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group select {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 3px solid var(--border-color);
    border-radius: 10px;
    background-color: white;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 4px rgba(0, 172, 193, 0.2);
}

.form-group select:hover {
    border-color: var(--primary-teal);
}

.search-btn {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    background: var(--coral);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(232, 122, 120, 0.4);
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(232, 122, 120, 0.5);
    background: var(--dark-coral);
}

.search-btn:active {
    transform: translateY(-1px);
}

.search-btn span {
    margin-right: 8px;
    font-size: 1.3rem;
}

/* ========================================
   Results Section
   ======================================== */
.results-section {
    padding: 2rem 0;
}

.results-card {
    background: var(--background-white);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 30px rgba(233, 30, 99, 0.15);
    border-left: 6px solid var(--primary-teal);
    border-right: 6px solid var(--coral);
}

.results-header {
    border-bottom: 3px solid var(--primary-teal);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.results-header h2 {
    color: var(--coral);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.route-info {
    color: var(--text-gray);
    font-size: 1.1rem;
    font-weight: 600;
}

.key-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-box {
    background: var(--cream);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 5px solid var(--primary-teal);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.metric-box.cost {
    border-left-color: var(--coral);
    background: rgba(232, 122, 120, 0.1);
}

.metric-box.timeline {
    border-left-color: var(--light-teal);
    background: var(--mint);
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--coral);
}

.section-block {
    margin-bottom: 2rem;
}

.section-block h3 {
    color: var(--primary-teal);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.requirements-list {
    list-style: none;
    padding-left: 0;
}

.requirements-list li {
    padding: 0.8rem 0 0.8rem 2rem;
    position: relative;
    border-bottom: 2px solid rgba(255, 107, 157, 0.1);
}

.requirements-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-teal);
    font-weight: 700;
    font-size: 1.3rem;
}

.requirements-list li:last-child {
    border-bottom: none;
}

.info-box {
    background: #FFF9E6;
    border-left: 5px solid var(--primary-teal);
    padding: 1.2rem;
    border-radius: 10px;
    margin: 1rem 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.info-box.special {
    background: rgba(232, 122, 120, 0.1);
    border-left-color: var(--coral);
}

.info-box.temp-permit {
    background: var(--mint);
    border-left-color: var(--primary-teal);
}

.cta-button {
    display: inline-block;
    padding: 14px 32px;
    background: var(--coral);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 6px 20px rgba(232, 122, 120, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(232, 122, 120, 0.4);
    background: var(--dark-coral);
}

.additional-notes {
    background: var(--cream);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-gray);
    border: 2px solid var(--border-color);
}

/* ========================================
   No Results Section
   ======================================== */
.no-results {
    padding: 2rem 0;
}

/* ========================================
   Info Section
   ======================================== */
.info-section {
    padding: 3rem 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.info-card {
    background: var(--background-white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 6px 25px rgba(233, 30, 99, 0.12);
    border-top: 5px solid var(--coral);
    border-bottom: 5px solid var(--primary-teal);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(233, 30, 99, 0.2);
}

.info-card h3 {
    color: var(--coral);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 800;
}

.info-card p {
    color: var(--text-gray);
    line-height: 1.6;
    font-weight: 500;
}

/* ========================================
   About Section
   ======================================== */
.about-section {
    background: var(--background-white);
    padding: 2.5rem;
    border-radius: 16px;
    margin: 2rem 0;
    box-shadow: 0 6px 25px rgba(0, 172, 193, 0.12);
    border: 3px solid var(--light-teal);
}

.about-section h3 {
    color: var(--primary-teal);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 800;
}

.about-section p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    font-weight: 500;
}

.about-section ul {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.about-section ul li {
    margin-bottom: 0.8rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* ========================================
   Footer
   ======================================== */
footer {
    background: var(--dark-teal);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: 
        repeating-linear-gradient(
            90deg,
            var(--coral) 0px,
            var(--coral) 20px,
            var(--primary-teal) 20px,
            var(--primary-teal) 40px,
            var(--light-teal) 40px,
            var(--light-teal) 60px,
            var(--primary-teal) 60px,
            var(--primary-teal) 80px
        );
}

footer p {
    margin: 0.5rem 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

/* ========================================
   Utility Classes
   ======================================== */
.small-text {
    font-size: 0.85rem;
    color: var(--text-gray);
}

.hidden {
    display: none;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .affiliate-sidebar {
        position: static;
        max-height: none;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .nurse-icon {
        width: 60px;
        height: 60px;
    }

    .logo-space h1 {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 0.85rem;
        letter-spacing: 1px;
    }

    .map-card {
        padding: 1.5rem;
    }

    .map-instructions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .instruction-step {
        font-size: 0.85rem;
    }

    #usMap text {
        font-size: 9px;
    }

    .map-legend {
        gap: 1rem;
    }

    .legend-item {
        font-size: 0.8rem;
    }

    .search-card {
        padding: 1.5rem;
    }

    .results-card {
        padding: 1.5rem;
    }

    .key-metrics {
        grid-template-columns: 1fr;
    }

    .metric-value {
        font-size: 1.5rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    header {
        padding: 1.5rem 0;
    }

    .nurse-icon {
        width: 50px;
        height: 50px;
    }

    .logo-space {
        gap: 1rem;
    }

    .logo-space h1 {
        font-size: 1.3rem;
    }

    .tagline {
        font-size: 0.75rem;
    }

    .hero {
        padding: 2rem 0 1.5rem;
    }

    .search-card,
    .results-card,
    .about-section {
        padding: 1.2rem;
    }

    .map-card h3 {
        font-size: 1.3rem;
    }

    #usMap {
        padding: 1rem;
    }

    #usMap text {
        font-size: 7px;
    }
}
