* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 0 0 15px 0;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-content {
    display: flex;
    flex-direction: row;
    gap: 25px;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.info-panel {
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: left;
    flex: 1;
}

.info-panel h1 {
    color: #2C3E50;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.info-text p {
    color: #2C3E50;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.signature {
    font-style: italic;
    color: #5a6c7d;
    margin-top: 10px;
}

.search-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.search-panel > div {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
}

.search-panel h2 {
    color: #2C3E50;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.search-summary {
    background: white;
    border-radius: 12px;
    padding: 20px 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.search-summary-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.search-params {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    flex: 1;
}

.search-params .param {
    color: #5a6c7d;
    font-size: 0.95rem;
}

.search-params .param strong {
    color: #2C3E50;
}

.new-search-btn {
    background: #9CAF88;
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.new-search-btn:hover {
    background: #8a9d78;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 175, 136, 0.3);
}

#searchForm {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #2C3E50;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #9CAF88;
}

.checkbox-group {
    display: flex;
    align-items: center;
    grid-column: span 1;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: 500;
    margin-bottom: 0;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.address-search-container {
    position: relative;
}

.address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.address-suggestions.active {
    display: block;
}

.address-suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    font-size: 0.95rem;
    color: #2C3E50;
}

.address-suggestion-item:last-child {
    border-bottom: none;
}

.address-suggestion-item:hover,
.address-suggestion-item.selected {
    background-color: #f5f7fa;
}

.address-suggestion-item.selected {
    background-color: #e8f5e9;
}

.no-matches-warning {
    padding: 15px;
    color: #666;
    font-size: 0.95rem;
    text-align: center;
    font-style: italic;
    background-color: #fef8e7;
    border-left: 3px solid #ffc107;
}

.search-btn {
    grid-column: 1 / -1;
    background: #9CAF88;
    color: white;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.search-btn:hover {
    background: #8a9d78;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 175, 136, 0.3);
}

.postal-codes-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.postal-codes-section h3 {
    color: #2C3E50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.postal-codes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.postal-code-item {
    background: #f5f7fa;
    color: #2C3E50;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.postal-code-item:hover {
    background: #e8f5e9;
    border-color: #9CAF88;
}

/* Compact search section */
.compact-search-section {
    background: white;
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#compactSearchForm {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
}

.compact-form-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 150px;
}

.compact-form-group label {
    color: #2C3E50;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.compact-form-group input[type="text"],
.compact-form-group input[type="number"],
.compact-form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.compact-form-group input[type="text"]:focus,
.compact-form-group input[type="number"]:focus,
.compact-form-group select:focus {
    outline: none;
    border-color: #9CAF88;
}

#compactSearchForm .search-btn {
    padding: 10px 24px;
    margin: 0;
    font-size: 1rem;
}

.filters-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group h3 {
    color: #2C3E50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.sort-buttons {
    display: flex;
    gap: 10px;
}

.sort-btn {
    padding: 8px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #5a6c7d;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.sort-btn:hover {
    border-color: #9CAF88;
    color: #9CAF88;
}

.sort-btn.active {
    background: #9CAF88;
    color: white;
    border-color: #9CAF88;
}

.results-section {
}

.loading-spinner {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: #9CAF88;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.doctor-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.doctor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.doctor-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.doctor-name {
    color: #2C3E50;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.doctor-specialty {
    color: #9CAF88;
    font-size: 0.95rem;
    font-weight: 500;
}

.distance-badge {
    background: #F39C12;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.doctor-info {
    margin-top: 15px;
}

.info-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #5a6c7d;
}

.info-label {
    font-weight: 600;
    margin-right: 8px;
    min-width: 80px;
}

.doctor-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 15px;
}

.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-inactive {
    background: #ffebee;
    color: #c62828;
}

.no-results {
    background: white;
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.no-results h3 {
    color: #2C3E50;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.no-results p {
    color: #5a6c7d;
    font-size: 1.1rem;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

/* Footer Styles */
.site-footer {
    padding: 20px 20px;
    flex-shrink: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2C3E50;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.github-link:hover {
    color: #3B82F6;
}

.github-icon {
    transition: transform 0.3s ease;
}

.github-link:hover .github-icon {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        padding: 0 15px;
    }

    .info-panel {
        padding: 20px 15px;
    }

    .info-panel h1 {
        font-size: 1.8rem;
    }

    .info-text p {
        font-size: 0.95rem;
    }

    .search-panel > div {
        padding: 20px;
    }

    .search-panel h2 {
        font-size: 1.5rem;
    }

    #searchForm {
        grid-template-columns: 1fr;
    }

    #compactSearchForm {
        flex-direction: column;
        align-items: stretch;
    }

    .compact-form-group {
        min-width: 100%;
    }

    #compactSearchForm .search-btn {
        width: 100%;
    }

    .search-summary-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-params {
        flex-direction: column;
        gap: 10px;
    }

    .new-search-btn {
        width: 100%;
    }

    .results-container {
        grid-template-columns: 1fr;
    }

    .doctor-header {
        flex-direction: column;
        gap: 10px;
    }

    .site-footer {
        padding: 30px 15px 20px;
    }
}