/* --- PAGE LAYOUT & CONTAINERS --- */
.clinics-page-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    font-family: sans-serif;
}

.clinics-header {
    text-align: center;
    margin-bottom: 25px;
}

.clinics-header h1 {
    color: var(--primary-color, #6f00ff);
    margin-bottom: 10px;
    font-family: 'Press Start 2P', monospace;
    font-size: 1.5rem;
    line-height: 1.4;
}

.clinics-header h2 {
    color: var(--color-pink, #ff69b4);
    margin-bottom: 15px;
}

.clinics-header p {
    color: #444;
    line-height: 1.5;
}

/* --- DISCLAIMER BOX --- */
.pro-tip-box.info-tip {
    background-color: #f0f4ff;
    border-left: 4px solid var(--primary-color, #6f00ff);
    padding: 15px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 30px;
    font-size: 0.95rem;
    color: #555;
}

/* --- SEARCH FORM --- */
.clinic-search-section {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.zip-search-form {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 500px;
}

.zip-input {
    flex-grow: 1;
    padding: 12px 20px;
    border: 2px solid #ccc;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.zip-input:focus {
    border-color: var(--primary-color, #6f00ff);
}

.search-btn {
    background-color: var(--primary-color, #6f00ff);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 1rem;
}

.search-btn:hover {
    background-color: #5900cc;
}

/* --- CLINIC CARDS --- */
.clinic-results-section h3 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.clinic-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.clinic-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.clinic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.clinic-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.clinic-name {
    color: var(--primary-color, #6f00ff);
    font-size: 1.2rem;
    margin: 0;
}

.distance-badge {
    background-color: #f4f4f4;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: bold;
    color: #555;
    white-space: nowrap;
}

.clinic-details p {
    margin: 5px 0;
    color: #444;
    font-size: 0.95rem;
}

.clinic-details a {
    color: var(--primary-color, #6f00ff);
    text-decoration: none;
    font-weight: bold;
}

.clinic-details a:hover {
    text-decoration: underline;
}

.clinic-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

/* Tier Badges */
.cost-tier-badge {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
}

.tier-free {
    background-color: #e6ffed;
    color: #0b8a29;
}

.tier-sliding-scale {
    background-color: #fff4e6;
    color: #b35900;
}

.tier-low-cost {
    background-color: #e6f0ff;
    color: #004085;
}

.directions-btn {
    background-color: transparent;
    color: var(--primary-color, #6f00ff);
    text-decoration: none;
    padding: 8px 16px;
    border: 2px solid var(--primary-color, #6f00ff);
    border-radius: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.directions-btn:hover {
    background-color: var(--primary-color, #6f00ff);
    color: white;
}

/* Error Messages */
.error-message, .no-results-message {
    text-align: center;
    color: #d9534f;
    background-color: #fdf7f7;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #ebccd1;
}

.no-results-message {
    color: #555;
    background-color: #f9f9f9;
    border-color: #eee;
}

/* -------------------- MOBILE MEDIA QUERY -------------------- */
@media (max-width: 768px) {
    /* 1. Maximize screen real estate */
    .clinics-page-container {
        margin: 20px 10px;
        padding: 20px 15px;
    }

    /* 2. Adjust header sizing for smaller viewports */
    .clinics-header h1 {
        font-size: 1.2rem;
        line-height: 1.5;
    }

    .clinics-header h2 {
        font-size: 1.1rem;
    }

    /* 3. Stack the search input and button */
    .zip-search-form {
        flex-direction: column;
        gap: 15px;
    }

    .search-btn {
        width: 100%;
    }

    /* 4. Prevent long clinic names from squishing the distance badge */
    .clinic-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .distance-badge {
        align-self: flex-start;
    }

    /* 5. Make the call-to-action button prominent and easy to tap */
    .clinic-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .directions-btn {
        width: 100%;
        text-align: center;
    }
}